We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%%zipline
%%zipline --start 2010-1-1 --end 2018-1-1 --data-frequency daily --no-benchmark from zipline.api import order_target, record, symbol import pandas as pd
def initialize(context): context.i = 0 context.assets = [symbol('FB'), symbol('GOOG'), symbol('AMZN')]
def handle_data(context, data): df = data.history(context.assets, fields=['price', 'volume'], bar_count=1, frequency="1d") df = df.reset_index()
if context.i == 0: df.columns = ['date', 'asset', 'price', 'volume'] df.to_csv('stock_data.csv', index=False) else: df.to_csv('stock_data.csv', index=False, mode='a', header=None) context.i += 1
when running above,error happen: UsageError: Line magic function %%zipline not found.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
%%zipline --start 2010-1-1 --end 2018-1-1 --data-frequency daily --no-benchmark
from zipline.api import order_target, record, symbol
import pandas as pd
def initialize(context):
context.i = 0
context.assets = [symbol('FB'), symbol('GOOG'), symbol('AMZN')]
def handle_data(context, data):
df = data.history(context.assets, fields=['price', 'volume'], bar_count=1, frequency="1d")
df = df.reset_index()
when running above,error happen:
UsageError: Line magic function
%%zipline
not found.The text was updated successfully, but these errors were encountered: