Hi GAT,
I’ve been using pysystemtrade to backtest several strategies, that I would now like to try to track in real time.
I am not sure exactly how I should proceed here in terms of pysytemtrade. Please correct me if I’m wrong or if there is a better way to do it, but the steps I am thinking of are as follows:
1. Run the following code with my config:
from systems.provided.futures_chapter15.basesystem import *
from syscore.pdutils import align_to_joint, uniquets, divide_df_single_column
from syscore.dateutils import generate_fitting_dates
from syscore.algos import robust_vol_calc
from systems.portfolio import Portfolios
config = Config("private.my_system.futuresestimateconfig.yaml")
system = System([Account(), Portfolios(), PositionSizing(), FuturesRawData(), ForecastCombine(), ForecastScaleCap(), Rules()], csvFuturesData(), config)
system.set_logging_level("on")
system.accounts.portfolio()
2. I then obtain each position by using:
data = csvFuturesData()
for instrument in data.get_instrument_list():
system.accounts.get_buffered_position(instrument, roundpositions=True).tail()
3. Assume then nothing changes except that I get new price data coming in for each instrument. How should I proceed in order to obtain new updated positions based on new data without having to run the whole system again?