Back to Community
New back test layout is bad and missing functionality

The view code on the back test is now missing, so if you want to see what you did that worked, you can't. Also, the benchmark is now missing, so I have to run to another site to see whether or not I beat my benchmark for that given time frame. Poor implementation.

8 responses

The code is available on the 'Activity' tab, under 'Code'.

Also, if you append '/old' to your backtest URL, you can see the old backtest which includes the benchmark and any custom plots. They are working on including these on the new backtest page.

Has anyone tried copy the full code from 'Activity > Code' into the IDE and run it successfully?

Yes, this works. Just tested it.

Right now I tried and got:
3 Error SyntaxError: unexpected indent

Here's how it looks:

    # Multi period volatility minute data  
    # ----------------------------------------------------------------------------  
    stocks, ma_2, ma_3, ma_w, ma_m, ma_q = symbols('AAPL','NFLX'), 2, 3, 5, 21, 63  
    # ----------------------------------------------------------------------------  
    def initialize(context):  
        schedule_function(record_vol, date_rules.every_day(), time_rules.market_close())

    def record_vol(context, data):  
        for stock in stocks:  
            if data.can_trade(stock):  
                vol_2 = data.history(stock, 'price', ma_2*390,'1m').std()  
                vol_3 = data.history(stock, 'price', ma_3*390,'1m').std()  
                vol_w = data.history(stock, 'price', ma_w*390,'1m').std()  
                vol_m = data.history(stock, 'price', ma_m*390,'1m').std()  
                vol_q = data.history(stock, 'price', ma_q*390,'1m').std()  

                record(vol_2 = vol_2, vol_3 = vol_3, vol_w = vol_w, vol_m = vol_m, vol_q = vol_q)  

and here is the original:

# Multi period volatility minute data  
# ----------------------------------------------------------------------------  
stocks, ma_2, ma_3, ma_w, ma_m, ma_q = symbols('AAPL','NFLX'), 2, 3, 5, 21, 63  
# ----------------------------------------------------------------------------  
def initialize(context):  
    schedule_function(record_vol, date_rules.every_day(), time_rules.market_close())

def record_vol(context, data):  
    for stock in stocks:  
        if data.can_trade(stock):  
            vol_2 = data.history(stock, 'price', ma_2*390,'1m').std()  
            vol_3 = data.history(stock, 'price', ma_3*390,'1m').std()  
            vol_w = data.history(stock, 'price', ma_w*390,'1m').std()  
            vol_m = data.history(stock, 'price', ma_m*390,'1m').std()  
            vol_q = data.history(stock, 'price', ma_q*390,'1m').std()  

            record(vol_2 = vol_2, vol_3 = vol_3, vol_w = vol_w, vol_m = vol_m, vol_q = vol_q)  

Hmm? I did not encounter an error.

Grant,

What browser do you use?
I use Firefox Quantum 60.0.2 (64-bit).

Vladimir,

I have the same issue and contacted Q about this. They said it's a bug they're seeing with Firefox and it's currently on their list of items to fix.

Troy