universal-portfolios
universal-portfolios copied to clipboard
2 questions
Hi Marigold! I have 2 questions:
-
How do you get a time-series, with the result of the olps every day, out of the "result"? I can only find summaries like the "result.summary()" from the result.
-
How do you plot the result of many different olps in the same graph? Right now you only get one olps as PORTFOLIO and UCRP when doing "result.plot()".
Thank you for your time in advance.
- Check out
result.__dict__
for a dictionary of all available attributes. You're probably looking forresult.r
which is series of daily returns (to be precise, returns + 1) - There are no methods in the library to do so, but you can easily do it yourself. Extract equity from every olps with
result.equity
and add them to a dataframe, then calldf.plot()
to plot all columns of that dataframe in a line chart