Error : SyntaxError: expected an indented block
Hi Folks - New with Python and Quantopian
Strategy : To import daily recommendations from Google Document with information (i) Report Date (ii) Symbol (iii) NoOfStocks (iv) StopLossPercent
Put it into pipeline and add latest Closing Price. And be able to preview the data imported along with their latest Closing Price before the next step happens. Keeping the data set as variables to process further calculations.
Eventually the next day clean up all pipeline to run this process all over again.
Can anyone help with such such strategy execution plan.
The code shown below gives an error on fetch_csv line.
Preview Data Set
def preview(df):
log.info(df.head())
return df
Getting the pipeline for US Equity Stocks
from quantopian.algorithm import attach_pipeline, pipeline_output
from quantopian.pipeline import Pipeline
from quantopian.pipeline.data.builtin import USEquityPricing
Called once at the start of the algorithm.
def initialize(context):
Create and attach an empty Pipeline.
pipe = Pipeline()
pipe = attach_pipeline(pipe, name='my_pipeline')
Getting Daily Recommendations from Google Document
def handle_data(context, data):
pass