-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
-
I am wondering if someone already came with a way to run those strategies on live trading. I am running the back testing, and it looks fine to me. For example, when new data (candlestick) is available, it would nice to run some function to produce trade signal.
Using self.I(function_name ..), is time saver to avoid calculating indicators again.
If this possible, please share your knowledge. If not, what alternative could be available to use the strategies with minimal modifications.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 4 comments
-
Similar use case, but not for actual live trading with various brokers, it would be nice to be able to update a given strategy as new market data becomes available. In order to continually evaluate a strategy's performance and behavior. basically paper trading the strategies but updating the entire object. Rather than rebuilding the entire backtest or trying to figure out how to append two different time periods.
Example, suppose I have multiple (10-20 strategies) that I would like continually update as new market data comes in. I would like to save to our database each evening, or hour, or whatever period, the most up to date _equity_curve
_trades
and other relevant stats. Rather than re-run the historical backtest, is there a way to save the state then when new data becomes available ingest that new data without re-running the entire backtest? @kernc
Beta Was this translation helpful? Give feedback.
All reactions
-
FWIW there is an open issue which may provide more info #81
Beta Was this translation helpful? Give feedback.
All reactions
-
Working on a similar project TM️ . Quite entertaining attempting to implement the various features together. I will say that the project grows quite quickly ⏫ , once attempting to account for all the possibilities encountered during live trading. i.e. check for existing balance of token 💲 , check to make sure that prior orders have posted (critical if using 'limit' orders), deciding which statistics are valuable enough to display 〽️ , and which would just be adding to the confusion?
Beta Was this translation helpful? Give feedback.
All reactions
-
I am wondering if someone already came with a way to run those strategies on live trading
I have scheduled to run backtests every day and extract the last day result together with stats
. If trading signal is detected, the system sends the notification.
See the function run_backtest_for_ticker
here - https://github.com/s-kust/python-backtesting-template/blob/main/strategy/run_backtest_for_ticker.py - and note that it returns last_day_result
.
See also the stub of the process_last_day_res
function here - https://github.com/s-kust/python-backtesting-template/blob/main/utils/strategy_exec/last_day.py
Beta Was this translation helpful? Give feedback.