Using `Porfolio` object to generate an aggregated dataset that includes tickers' `ohlcv`, `bb_live` and macro data (indices data)

Hi,


It is very clear how to use alphien.data.getHistoryData() to load all sorts of data that is available. However, when it comes to backtesting, we need to create a Portfolio object, and it remains perplexing how to use alphien.portfolio.Portfolio() to generate an aggregated data file that includes (1) ohlcv and (2) bb_live for all selected tickers together with a complete set of (3) macro data (indices returned by getTickersSP500Data()).


If it is not possible, please let us know how can we incorporate all three parts of information during backtesting.

Thank you in advance for answering this.



You can do so using the dataFeatures class and instantiating an object from the class with all the information you need. You don’t need to use a file, once you have the dataFeature object you can pass the object to your payout in order to create your model.


The portfolio class will require you to provide your dataFeatures object and your payout in order to do the backtesting !


Please check the examples of the portfolio class.


Thanks.