The easiest way to access and analyze Philippine stock data
Project description
fastquant :nerd_face:
Easiest way to access and analyze Philippine stock data
fastquant allows you easily access stock data from PSE Edge with as few as 2 lines of python code. Its goal is to promote data driven investments in the Philippines by making relevant information accessible to everyone.
Features
- Easy access to Philippine stock data
- Templates for backtesting trading strategies on Philippine stocks
Installation
pip install fastquant
Get stock data from PSE
from fastquant import get_pse_data
df = get_pse_data("JFC", "2018-01-01", "2019-01-01")
print(df.head())
# open high low close value
#dt
#2018-01-03 253.4 256.8 253.0 255.4 190253754.0
#2018-01-04 255.4 255.4 253.0 255.0 157152856.0
#2018-01-05 255.6 257.4 255.0 255.0 242201952.0
#2018-01-08 257.4 259.0 253.4 256.0 216069242.0
#2018-01-09 256.0 258.0 255.0 255.8 250188588.0
Plot daily closing prices
from matplotlib import pyplot as plt
df.close.plot(figsize=(10, 6))
plt.title("Daily Closing Prices of JFC\nfrom 2018-01-01 to 2019-01-01", fontsize=20)
Analyze with a simple moving average (SMA) trading strategy
ma30 = df.close.rolling(30).mean()
close_ma30 = pd.concat([df.close, ma30], axis=1).dropna()
close_ma30.columns = ['Closing Price', 'Simple Moving Average (30 day)']
close_ma30.plot(figsize=(10, 6))
plt.title("Daily Closing Prices vs 30 day SMA of JFC\nfrom 2018-01-01 to 2019-01-01", fontsize=20)
Backtesting templates
Using the backtrader framework
Relative strength index (RSI) trading strategy (14 day window)
Daily Jollibee prices from 2017-01-01 to 2019-01-01
python examples/jfc_rsi.py
Min max support resistance trading strategy (30 day window)
Daily Jollibee prices from 2017-01-01 to 2019-01-01
python examples/jfc_support_resistance.py
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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for fastquant-0.1.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a83b6031ad5c45cdeb15e567770b5792db6f2902e5835104178874f2e9b378ae |
|
MD5 | af26ba77533cb858e890afeaeef66a08 |
|
BLAKE2b-256 | 4e759d3aa37d4be3c5a99b76248c4e750bb55bf20d17ffeeff8b47afbdbd3335 |