Back to Community
What is the quickest way to view returns as log scale?

Is it possible to load a backtest and draw a log scale chart of returns?

While at it is it easy to add CAGR returns to it (since Q shows only total returns)

3 responses

also wondering.

I just happened to notice the tear sheet gives you logarithmic returns.

backtest = get_backtest('XXX')  
backtest.create_full_tear_sheet()  

Use Pyfolio. https://www.quantopian.com/posts/new-feature-comprehensive-backtest-analysis

The full tear sheet gives the log returns and a lot of other info. In a Notebook run the following.

my_backtest = get_backtest('59736cfb8d32cc4e1a9ddb59')  
my_backtest.create_full_tear_sheet()

You can also run specific plots. To get just the plot of the log returns do something like this.


import pyfolio as pf  
my_backtest = get_backtest('59736cfb8d32cc4e1a9ddb59')  
pf.plotting.plot_rolling_returns(my_backtest.daily_performance.returns, logy=True)

Replace 59736cfb8d32cc4e1a9ddb59 with your desired backtest ID.