Code Monkey home page Code Monkey logo

invbt's Introduction

ART Investment-Strategy-Backtester:

Introduction

Welcome to Investment-Strategy-Backtester, a robust open-source library designed to aid in the crafting and evaluation of investment strategies. Built, maintained and used by Alpha Rho Technologies LLC.

Features

  • Versatility: Backtest any investment strategy, whether traditional or unconventional.
  • Flexibility: Test across a range of timeframes, from intraday to multi-year spans.
  • Precision: Incorporate transaction costs for realistic and accurate simulation results.

Setup

  1. Prerequisites:

    • Python 3.6 or higher.
    pip install pandas
    pip install datetime
    pip install numpy
  2. Clone the Repository:

    git clone https://github.com/Alpha-Rho-Technologies/invbt
    
  3. Navigate to the cloned directory:

    cd path_to_directory

How to use:

Step 1: Obtain Asset Price Data in CSV Format

  • File Structure: Ensure your downloaded data is structured in a table with with dates utilized as the index column and respective asset prices presented in subsequent columns.
  • Content: The table should encapsulate the historical price data for all portfolio assets, facilitating accurate and comprehensive backtesting.

Note: Ensure the data frequency (e.g., daily, monthly) aligns with your backtesting objectives.

Step 2: Create a Weightings CSV

  • File Structure: Construct a CSV file wherein the first column enumerates the assets and subsequent columns represent rebalance dates.
  • Content: Populate the table cells with the corresponding asset weight on each rebalance date.

Note: If needed, refer to the sample files located within the repository's files folder, for further guidance.

Step 3: Organize Repository Files

  • Place the prepared files into the files folder within the repository, adhering to the following naming conventions:
    • Portfolio asset data: apd.csv
    • Portfolio weightings at rebalance dates: portfolios.csv

Step 4: Execute the Backtest Script

  • Initiate the backtesting process by running example.ipynb using a Jupyter Notebook interface.

Note: Ensure your working directory is set to the repository location to avoid file path issues.

Support

For any queries or issues, please raise an issue in this repository or contact [email protected].

invbt's People

Contributors

manuel-rr avatar

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.