how to store btrun output in a csv file



  • I would like to store btrun output in a csv file.
    I am using following command to execute btrun -
    btrun --csvformat btcsv --data /data/EOD/TATASTEEL.csv --strategy strategy9999.py --cash 1000000 --commission 0.06 --analyzer :SharpeRatio --writer csv=True --fromdate 2017-01-01 --todate 2017-06-30 --observer :Broker

    --writer csv=True does output kind of a csv format but on the console only.
    Is there a way to create an output csv files.


  • administrators

    Use the redirect operator of the shell: command > myoutputfile.csv

    Or use --writer name=value and use out=xxx. The Writer options are documented here:


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.