Skip to main content

Bringing data driven investments to the mainstream

Project description

fastquant :nerd_face:

Build Status Code style: black License: GPL v3

Bringing data driven investments to the mainstream

fastquant allows you easily backtest investment strategies with as few as 3 lines of python code. Its goal is to promote data driven investments by making quantitative analysis in finance accessible to everyone.


  1. Easily access historical stock data
  2. Backtest trading strategies with only 3 lines of code

* - Both Philippine stock data and Yahoo Finance data are accessible straight from fastquant


pip install fastquant

Get stock data

All symbols from Yahoo Finance and Philippine Stock Exchange (PSE) are accessible via get_stock_data.

from fastquant import get_stock_data
df = get_stock_data("JFC", "2018-01-01", "2019-01-01")

#           dt  close   volume
#   2019-01-01  293.0   181410
#   2019-01-02  292.0  1665440
#   2019-01-03  309.0  1622480
#   2019-01-06  323.0  1004160
#   2019-01-07  321.0   623090

Note: Symbols from Yahoo Finance will return closing prices in USD, while symbols from PSE will return closing prices in PHP

Backtest trading strategies

Simple Moving Average Crossover (15 day MA vs 40 day MA)

Daily Jollibee prices from 2018-01-01 to 2019-01-01

backtest('smac', jfc, fast_period=15, slow_period=40)

# Starting Portfolio Value: 100000.00
# Final Portfolio Value: 102272.90

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fastquant, version
Filename, size File type Python version Upload date Hashes
Filename, size fastquant- (30.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page