Hi everyone!
I am new in this community and very happy so far what I am learning, my big issue is I am getting error with Zipline, I copied the algorithm "Instability of Parameter Estimates" but I am getting this error:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import math
import zipline
%%zipline --start 2000-1-1 --end 2014-1-1 -o perf_dma from zipline.api import order_target, record, symbol, history, add_history
def sharpeRatio(asset, riskfree):
return np.mean(asset-riskfree)/np.std(asset-riskfree)
start = '2012-01-01'
end = '2013-01-01'
treasury_ret = get_pricing('BIL', fields='price', start_date=start, end_date=end).pct_change()[1:]
pricing = get_pricing('AMZN', fields='price', start_date=start, end_date=end)
returns = pricing.pct_change()[1:] # Get the returns on the asset
ERROR:root:Cell magic %%zipline
not found.
Has anyone run into the same problem?
Thanks,
Vincent.