Giter Club home page Giter Club logo

adaptive-asset-allocator-simulator's Introduction

Adaptive Asset Allocator Simulator

Simulates an adaptive asset allocation investment strategy over time

Installing

I suggest using a python virtual environment. First, install Asset Universe. Then, install the rest of the python requirements in a virtual environment:

pip install -r requirements.txt

Using

Open simulate.py and edit the parameters:

  1. Start/end date
  2. Assets
  3. Leverage (1.0 = no leverage, 1.5 = borrowing 50% of your portfolio from the broker at the daily interest rate specified in au.borrowrate.returns)
  4. Momentum metrics
  5. Subportfolio thresholds and allocations

Then, run python simulate.py. The code will simulate many subportfolios and print progress after every 10th subportfolio simulated. At the end, you should get console output and some pretty graphs. The plots should open automatically. If not, they are saved as html files, and you can open them separately.

Example output:

Downloading asset universe data... 
[*********************100%***********************]  10 of 10 completed
Done.
Backend MacOSX is interactive backend. Turning interactive mode on.
Finished subportfolio: 10 of 54
Finished subportfolio: 20 of 54
Finished subportfolio: 30 of 54
Finished subportfolio: 40 of 54
Finished subportfolio: 50 of 54
[==========] Backtesting
Backtest performance stats:
CAGR         = 11.6
Annual Vol.  = 13.3
Sharpe Ratio = 0.87
Max Drawdown = -26.7

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.