Giter Club home page Giter Club logo

alpaca-js-backtesting's People

Contributors

kendelchopp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

alpaca-js-backtesting's Issues

Use startEpochTime When Running the Simulation

Sometimes, different securities will have different amounts of data available with different times. As a result, we should be simulating by grabbing the next data by time, rather than just grabbing the next piece of data for all securities.

Allow Users to Pass Data Instead of Alpaca

Allow users to pass in data instead of requesting it through passed in Alpaca. This would benefit us in 2 ways:

  1. Most importantly, users would not have to pass in their authenticated Alpaca object into the package. Instead, they can fetch the data themselves then pass it in, and we never touch Alpaca.

  2. Allow users to retrieve data from sources outside of Alpaca to use for testing.

For this, we won't worry so much about verifying the schema of the data, but it is something we can think about down the line. Additionally, we should update the README to show users how to do this.

To accomplish this will likely require modifying:

  • Backtest constructor to accept Alpaca OR bar data
  • Websocket constructor to accept the loaded data
  • Websocket loadData to use the already loaded data rather than hitting the Alpaca object
  • README to reflect these changes.

backtesting timeframe

There seems to be an issue with the start and end times of the back tester. The onStockAggMin() function only runs a max of 100 times, regardless of how far back the start date has been set. And it doesn't run at all if the start and end date are fewer than 4 days apart.

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.