Problem with generating basic TradingAlgorithm object

351 views
Skip to first unread message

Mujun Song

unread,
Dec 19, 2020, 8:49:43 AM12/19/20
to Zipline Python Opensource Backtester
Hi, 

I have a problem with generating basic TradingAlgorithm object.

When I type the code below,

algo = TradingAlgorithm(initialize = initialize, handle_data = handle_data)


I have an error like this.
TypeError: __init__() missing 1 required positional argument: 'sim_params'

I can't figure out this error and can't find any explanation about sim_params parameter.

Looking forward to getting your response. Thanks.

Ayoub Ennassiri

unread,
Dec 21, 2020, 5:19:47 AM12/21/20
to Mujun Song, Zipline Python Opensource Backtester
Hi Mujun, 


sim_params=SimulationParameters(
start_session=start,
end_session=end,
trading_calendar=trading_calendar,
capital_base=capital_base,
data_frequency=data_frequency,
)

sim_params is of SimulationParameters (zipline/finance/trading.py).

Thanks
Ayoub
--
You received this message because you are subscribed to the Google Groups "Zipline Python Opensource Backtester" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zipline+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zipline/ae1df92b-670f-4dd6-a185-1315fe23a353n%40googlegroups.com.


--
Ayoub ENNASSIRI
Reply all
Reply to author
Forward
0 new messages