I'm trying to build an algorithm to capture VIX term structure risk premium, but as a begginer, I'm moving very slowly.
I've been able to upload a file with the slopes of the term structure, and fetch it from the algorithm. However, as I need to regress stock price changes to the vix slope changes, I need historical values from the external data. At this point I'm not worried if the solution is inelegant, just want to have it working.
I'm trying to use the pre_func to upload all the data to context, but I have not been able yet. I get problems with the arguments to the pre_func. This is my next challenge.
Please don't get confused. The algorithm right now is not doing anything. I've not yet implemented the strategy.