Git Product home page Git Product logo

autotrader-demo's Introduction

AutoTrader Logo

Welcome to the AutoTrader Demo Repository

This repository contains example strategies to help you get started with AutoTrader. Please note that the strategies here are for the latest release of AutoTrader.

Getting Started

Install AutoTrader

To run the strategies in this repository, you must first have AutoTrader installed. The easiest way to do so is by using pip:

pip install autotrader

Download this Repository

Clone this repository by your preffered method. If you are new to git, simply click the green 'code' button at the top right of this page and download the zip. Alternatively, click here. You can also clone the repository on the command line using:

git clone https://github.com/kieran-mackle/autotrader-demo/ 

Backtest a Strategy

After cloning this repo, you are ready to begin backtesting any of the strategies. Simply run runfile.py, after specifying the name of the strategy's configuration file (located in the config/ directory). For example, to run the MACD Crossover Trend Strategy, the runfile will look as so:

from autotrader.autotrader import AutoTrader      # Import AutoTrader

at = AutoTrader()                                 # Create AutoTrader instance
at.configure(show_plot=True, verbosity=1)         # Configure the settings of AutoTrader
at.add_strategy('macd')                           # Provide the name of the strategy configuration file
at.backtest(start = '1/1/2020',                   # Configure the backtest
            end = '1/1/2021',
            initial_balance=1000,
            leverage = 30)
at.run()                                          # Run AutoTrader

Tutorials

If you would like a detailed explanation of how to construct a strategy with AutoTrader, refer to the tutorials on the AutoTrader website, by clicking here.

Demo Strategies

The following is a list of demo strategies provided in this repository. The configuration file names of each is provided.

  • macd.yaml MACD Crossover Trend Strategy (from the website tutorials)
  • ema_crossover.yaml/long_ema_crossover.yaml EMA Crossover Strategy (long only example plus long/short Forex example)
  • supertrend.yaml SuperTrend Trend Detector (AutoScan demo)
  • MTF_ema_crossover.yaml Multiple timeframe EMA Crossover example
  • rebalance.yaml Portfolio rebalancing example

Requesting a Strategy

Have a strategy you would like to be automated? Request it here.

autotrader-demo's People

Contributors

kieran-mackle 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.