Search results

  1. K

    Fully automated futures trading

    Awesome! :) So in the end you just used Shadow cost 250 and Buffer size 0.0125 based on common sense, checked that the results weren't crazy (higher turnover but lower costs) and didn't optimize these values any further.. So just to confirm, trading costs used in the objective function are...
  2. K

    Fully automated futures trading

    I finally implemented cost penalty and reran the backtest: with shadow-cost parameter adjusted to the same number of trades as the original system, the results look very good: PnL=1,037,130, Sharpe=0.93 (~40 instruments) compared to 871,287.69$\0.75 (22 instruments, same capital) without...
  3. K

    Fully automated futures trading

    I was finally able to run a backtest of my system with dynamic optimization, I haven't implemented any cost correction yet, and yeah, I can see a drop in PnL and Sharpe and 4.5x increase in the number of trades: - With the same number of 20 instruments as in the old system but added...
  4. K

    Fully automated futures trading

    yeah, checked pandas does and it does seem that way: "return a.cov(b, **kwargs) / (a.std(**kwargs) * b.std(**kwargs))". This seems like a lot of work to re-implement in C#, so I compared visually several options on some random prices converted to returns: 1. raw Excel correlations with constant...
  5. K

    Fully automated futures trading

    This makes sense, but I still didn't get whether we should apply exp weighting to returns or correlations or both. And when calculating each new observation of correlation (before applying exp-weighting to it) should we use the whole return history up to that point or just the recent X returns...
  6. K

    Fully automated futures trading

    I see, but after you've applied the exponential weighting to the 5 years of weekly returns, do you calculate Pearson correlation on all the 260(5*52) points (not on just the last 75)? In that case, wouldn't the old returns in the series affect the correlation as much as the recent ones? I.e. the...
  7. K

    Fully automated futures trading

    Just to confirm: in your correlation configuration you have these settings: using_exponent: True date_method: "expanding" rollyears: 20 ew_lookback: 25 - does is mean that every day you add one more point into the return series and calculate correlation on an ever-longer longer series (up to 20...
  8. K

    Fully automated futures trading

    A C# solver is something I would be very interested in :) ., but your C# solution does depend on CPLEX right? I checked it out, seems like a bulky framework with it's own IDE, can't be simply added to the solution as a nuget package.. A Matlab\Python solution would be nice too.. But maybe you...
  9. K

    Fully automated futures trading

    I see., yeah, this dynamic optimization really seems like a great thing. Need to start implementing it in my system.. and onboarding new contracts, which is so much work, oh.. :) Also, because I do everything in real time, i.e. I react to every new price tick from every contract I trade, I'll...
  10. K

    Fully automated futures trading

    Listened to the last TTU, interesting stuff as usual, but regarding limiting any single position to 100% of the system's base-capital by the position's notional, that seems to have a couple of issues: - first, I checked and currently quite a few instruments I trade have notional close to 200k...
  11. K

    Fully automated futures trading

    Oh, right, now I see that the variable is actually called "covariance_matrix_as_np" not "correlation_matrix_as_np" as I for some reason thought - I'm looking at one thing but reading it as another :) - I think all these weight variables are expressed in the "abstract instrument weight units"...
  12. K

    Fully automated futures trading

    So in this code: The variables "weights" and "weights_optimal_as_np" also contain instrument standard deviations not just portfolio weights (i.e. it's a vector of portfolio-weights multiplied by the corresponding instrument standard deviation)? Otherwise I don't see where individual instrument...
  13. K

    Fully automated futures trading

    Actually I just realized, normally to calculate portfolio volatility we also need volatilities of each instrument, but in your optimization you're not using them: solution_gap = weights - self.weights_optimal_as_np track_error =...
  14. K

    Fully automated futures trading

    This is really cool, thanks Rob, I thought you gave up on the idea, but I guess the researcher's curiosity took over :) So as I understand, you're applying this optimization at the very end (but before the risk-overlay logic, which serves as the final fail-safe), when you already have the final...
  15. K

    Fully automated futures trading

    Aaaand now it's back to normal :)
  16. K

    Fully automated futures trading

    looks like something is happening with the world today, the system is loosing money..
  17. K

    Fully automated futures trading

    no no, I'm not an experienced NG trader by any means, I didn't even know my position in it before I checked yesterday :) The system will close it automatically when the trend stops or reverses. If I start closing profitable positions manually overriding what the system wants to do, I will...
  18. K

    Fully automated futures trading

    oh yeah look at this, natural gas is on fire! I'm long 2 QG contracts at the moment..
  19. K

    Fully automated futures trading

    sorry, that didn't scan :)
  20. K

    Fully automated futures trading

    Welcome back Rob! Hope the vacation was nice :) I also had these ssl-errors with IB-Gateway in the last several weeks, simple restart was usually fixing it, but yesterday it gave me some other error about my version being too old, so I decided to upgrade to the last Gateway version, which turned...
Back
Top