Code Monkey home page Code Monkey logo

Comments (4)

letianzj avatar letianzj commented on May 17, 2024

Hi,

To confirm your version, Is the self._df_positions.loc line your line 69 or line 67?
Most likely it is the input data format. Right after you load the data, at line backtest_engine.add_data(symbol, data) in the ma_double_cross.py, can you check if the data is pandas timestamp indexed?

from quantresearch.

selvanponraj avatar selvanponraj commented on May 17, 2024

Hi,

My version of self._df_positions.loc is line 67. didn't make any change in the code.

data contains below value.

2021-04-23 16:59:56 4166.50 4166.50 4166.50 4166.50 1
2021-04-23 16:59:57 4166.50 4166.50 4166.50 4166.50 1
2021-04-23 16:59:58 4166.50 4166.75 4166.50 4166.75 11
2021-04-23 16:59:59 4166.75 4166.75 4166.75 4166.75 0

in line 67 self._df_positions.loc[performance_time]

performance_time is coming as None

from quantresearch.

letianzj avatar letianzj commented on May 17, 2024

Hi, The data is expected to have the time zone, e.g. 2021-04-23 16:59:56-04:00, can you email me the data file so I can take a look?

from quantresearch.

selvanponraj avatar selvanponraj commented on May 17, 2024

Hi Letian,

The issue is resolved, I have changed IB to US/Eastern timestamp and its working fine.

Thanks.

from quantresearch.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.