You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contrary to what zipline-live's feature page states
order/trading guards are supported, but not tested: LiveTradingAlgorithm.order() calls TradingAlgorithm._calculate_order(), which calls to TradingAlgorithm.validate_order_params() which finally enforces that the order meets the guards set by the user.
This effort is to prove that Trading Guards are working:
Create a testcase which tests that sets trading guards are called if they are set and used through LiveTradingAlgorithm.
The text was updated successfully, but these errors were encountered:
set_long_only() -> try to order a short: should fail
set_do_not_order_list([asset1, asset 2]) -> try order asset1 or asset 2: should fail
set_max_order_count(2): -> try order 1 time: success, 2 time success, 3 times fail
set_max_order_count(0): -> any order should fail
set_max_order_count(-1): -> any order should fail
set_max_order_size( max_shares=10) -> any order with more then 10 shares should fail
set_max_order_size( max_notional=1000.00) -> any order with more then 1000 $ should fail
set_max_order_size(asset1, max_shares=1) -> 2 shares of asset1 will fail
set_max_order_size(asset1, max_notional=1000.00) -> 1001.00 of value of asset1 will fail
first buy 10 shares for 1000 and then:
set_max_position_size( max_shares=11) -> any order with more then 1 shares should fail, 1 share should succeed
set_max_position_size( max_notional=1100.00) -> any order with more then 100 $ should fail, 99$ should succeed
set_max_position_size(asset1, max_shares=11) -> 2 shares of asset1 will fail, 1 will succeed
set_max_position_size(asset1, max_notional=1100.00) -> 101.00 of value of asset1 will fail, 100 will succeed
Contrary to what zipline-live's feature page states
order/trading guards are supported, but not tested:
LiveTradingAlgorithm.order()
callsTradingAlgorithm._calculate_order()
, which calls toTradingAlgorithm.validate_order_params()
which finally enforces that the order meets the guards set by the user.This effort is to prove that Trading Guards are working:
Create a testcase which tests that sets trading guards are called if they are set and used through
LiveTradingAlgorithm
.The text was updated successfully, but these errors were encountered: