date variable?

Scott_BlackwellScott_Blackwell Posts: 2
edited March 2017 in FAQs

is there a day variable for today's trading day......2016-08-03

or for whatever day you run a backtest?

Tagged:

Comments

  • Alex_KollarosAlex_Kollaros Posts: 7
    edited August 2016

    print 'Test date:\t%s' % service.time_to_string(service.system_time, '%Y-%m-%d')

  • mgmg Posts: 13
    edited June 2017

    service.system_time provides the timestamp from unix epoch, using that you can calculate the test date.

    https://app.cloudquant.com/application/#/glossary/151 has more information on the built in function that will convert the timestamp to your requested format. Also,

    todays_date = service.time_to_string(service.system_time, '%Y-%m-%d')

Sign In or Register to comment.