Bringing data driven investments to the mainstream
Project description
fastquant :nerd_face:
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.
Features
- Easily access historical stock data
- Backtest trading strategies with only 3 lines of code
*
- Both Philippine stock data and Yahoo Finance data are accessible straight from fastquant
Installation
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")
print(df.head())
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for fastquant-0.1.2.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acede367233084d6452882134923827dd091a35c1e677e0faedcf137386127b6 |
|
MD5 | 0d329e929b9872900f13c54f4cb60093 |
|
BLAKE2b-256 | c4d5a4b6b40f5f9f3646eaed907ba9ab54fea263d0f0bb3c492527fa4ea11295 |