A little bit late to the party, but this thread and Rob's books are really amazing. I am currently implementing some aspects of the book before I stumbled on here. Admittedly, the whole topic of dynamic optimisation is quite involved. It took me about 1 week to implement and debug it. There are really quite a few ugly details like matrix stability and it took me some time to figure out that I should floor the values of the correlation matrix at 0. Adding to the discussion of changing the starting weights. Sounds like a really reasonable idea but the implementation gets even more complex. If you have a positive, unrounded position and you decrease it (down to 0 at most), then the costs must also be decreased because the resulting state of the portfolio requires less trading to reach. Starting the search from 0 always produces costs for every new proposed solution. How do your implementations fare performance-wise? I struggle to get this thing faster, currently a full DO run takes 20 minutes for about 80 instruments with some of them starting in the late 70s. I used R to implement it with some parts inlined C++ for performance reasons. How long do your runs take?
I used to run full DO on every tick on ~100 instrument portfolio, but my server was choking on that and I didn't feel like upgrading it for really no reason (running it that frequently isn't adding any value), so now I'm running it every 10 seconds (implemented in C#), the load on all 6 CPU cores spikes to a 100% during that, but overall seems to be working fine. I don't know exactly how much time it takes, probably several seconds, and it's easily scalable if I add more CPUs, because I ran gap sigma calculations of the test portfolios in parallel on separate threads and then select the best from the current iteration on the main thread..
Sorry to bring back this old post, be I just read systematic trading, smart portfolios and AFTS books of Robert, installed pysystem, added 42 instruments from barchart, estimate everything using use_forecast_weight_estimates, use_forecast_div_mult_estimates, use_instrument_weight_estimates, use_instrument_div_mult_estimates, use_forecast_scale_estimates. Now that everything is running on my IB demo account, I started delving deeper into the estimated instrument weights and came across a discussion by kernfusion, which touched on manual multi-level weight adjustments. I attempted this approach using a spreadsheet for my own analysis like in the appendix C of systematic trading. Here’s where I need some insight: For the "Volatility" asset class at the top level (alongside RatesBonds, Equities, FX, and Commodities), which contains just two instruments (VIX and V2X), I allocated 20% of my total portfolio to Volatility (1/5 of top level asset classs), intending to split this equally between the two instruments. This results in 10% for VIX and another 10% for V2X. This distribution doesn’t seem right and doesn't align with the instrument weights observed in Rob's config setup. Could someone clarify if I'm missing something here, or share how you might approach this discrepancy? I'm curious to see how others are calculating the instrument weights. Thanks for any insights you might have!
I have another question regarding costs and dynamic optimisation: The formulas in the book calculate the cost penalty per contract as the sum of spread costs and commission. Why are rolling costs not considered here? I would assume if we had to choose between two identical instruments differing only in their number of annual rolls we would prefer the instrument with fewer rolls, correct?
Because DO doesn't know about rolls; it deals in notional instruments not individual contracts, and it's making a decision about whether to trade based on what the trading costs are. It would in theory be possible to consider rolling costs in DO, but very complicated for virtually no gain. Rob
I looked at your instrument weights in the config.yaml of rob_system under provided_system in pysystemtrade For Volatility I founded 3 instrument with the following weight V2X: 0.0175 VIX: 0.0175 VNKI: 0.015 Thats why I said it doesn't align with the 10% I get with the handcrafting method. I don't want to overallocate into the Volatility that's why I wanted to get feedback about it. Another weird thing is the weight I got when estimating it using pysystem. I will debug it this week to understand more in detail where it came from but that's one of the reason why I decided to made the exercice of handcrating the instrument weight. V2X: 0.008910991434708205 VIX: 0.008911029306800135 François
I have nearly 200 instruments in my config. So the average weight per instrument is 0.5%. The 5% total weight to vol is therefore pretty over representative. You can't compare that to a small portfolio. Rob
VNKY has whopping 90 contracts of open interest at 10k JPY (ie 65 dollars) per point. Why would you include it?