update readme

This commit is contained in:
ALIHAN DIKEL
2024-02-05 21:02:31 +03:00
parent f871c22f3e
commit 8a34625f04
3 changed files with 147 additions and 13 deletions

View File

@@ -7,33 +7,42 @@
* https://pypi.org/project/stocksymbol/
* Price Data
* Yahoo Finance API
* Strategy Backtesting
* backtesting.py
* https://kernc.github.io/backtesting.py/
## Code Structure
```
|
|-- assets
| |-- portfolio.py : dataclasses to represent wealth
|-- config
| |-- portfolios.yml : initial states of portfolios
| |-- strategies.yml : rules and parameters to generate signals
| |-- portfolios.yml : initial states of portfolios
|-- data
| |-- YYMMDD : scrapped historical trading data
| |-- tmp : disposable data here
| |-- YYMMDD : scrapped historical trading data
| |-- bt_plots : backtesting graphs stored here
| |-- trend_samples : to apply strtegies on bullish/bearish trends
|-- notebooks : jupy notebooks here
|-- ops
|-- fetch.py : methods to get hist trading data
|-- transform.py : methods to transform any data
|-- fetch.py : to get hist trading data
|-- portfolio.py : to handle portfolio operations
|-- transform.py : to transform any data
|- backtest.py : performs backtesting based on specified strategy
|- preprocess.py : retrieves hist trading data
```
## Installation
### Installing TA-Lib on ARM-based Macs
[source for TA-Lib](https://github.com/TA-Lib/ta-lib-python/issues/418#issuecomment-826129619)
```bash
brew install ta-lib
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
pip install ta-lib
```
[source for TA-Lib](https://github.com/TA-Lib/ta-lib-python/issues/418#issuecomment-826129619)
### Install requirements
```bash
pip install -r requirements.txt
```

View File

@@ -1,4 +0,0 @@
strategies:
- name: PercentChange
params:
change_threshold: 0.02

129
requirements.txt Normal file
View File

@@ -0,0 +1,129 @@
annotated-types==0.6.0
anyio==4.2.0
appdirs==1.4.4
appnope==0.1.3
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.14.0
Backtesting==0.3.3
beautifulsoup4==4.12.2
bleach==6.1.0
bokeh==3.3.4
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
comm==0.2.1
contourpy==1.2.0
cycler==0.12.1
debugpy==1.8.0
decorator==5.1.1
defusedxml==0.7.1
exceptiongroup==1.2.0
executing==2.0.1
fastjsonschema==2.19.1
finplot==1.9.4
fonttools==4.47.2
fqdn==1.5.1
frozendict==2.4.0
html5lib==1.1
idna==3.6
importlib-metadata==7.0.1
importlib-resources==6.1.1
investpy==1.0.8
ipykernel==6.29.0
ipython==8.18.1
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
json5==0.9.14
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter-client==8.6.0
jupyter-core==5.7.1
jupyter-events==0.9.0
jupyter-lsp==2.2.2
jupyter-server==2.12.5
jupyter-server-terminals==0.5.2
jupyterlab==4.0.12
jupyterlab-pygments==0.3.0
jupyterlab-server==2.25.2
kiwisolver==1.4.5
loguru==0.7.2
lxml==5.1.0
MarkupSafe==2.1.4
matplotlib==3.8.2
matplotlib-inline==0.1.6
mistune==3.0.2
multitasking==0.0.11
nbclient==0.9.0
nbconvert==7.14.2
nbformat==5.9.2
nest-asyncio==1.6.0
notebook-shim==0.2.3
numpy==1.26.3
overrides==7.7.0
packaging==23.2
pandas==2.1.4
pandas-ta==0.3.14b0
pandocfilters==1.5.1
parso==0.8.3
peewee==3.17.0
pexpect==4.9.0
pillow==10.2.0
platformdirs==4.2.0
prometheus-client==0.19.0
prompt-toolkit==3.0.43
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pydantic==2.5.3
pydantic-core==2.14.6
pygments==2.17.2
pyparsing==3.1.1
PyQt6==6.6.1
PyQt6-Qt6==6.6.1
PyQt6-sip==13.6.0
pyqtgraph==0.13.3
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.3.post1
PyYAML==6.0.1
pyzmq==25.1.2
referencing==0.33.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.17.1
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
stack-data==0.6.3
stocksymbol==0.0.5
TA-Lib==0.4.28
terminado==0.18.0
tinycss2==1.2.1
tomli==2.0.1
tornado==6.4
tqdm==4.66.1
traitlets==5.14.1
trendet==0.7
types-python-dateutil==2.8.19.20240106
typing-extensions==4.9.0
tzdata==2023.4
Unidecode==1.3.8
uri-template==1.3.0
urllib3==2.1.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
xyzservices==2023.10.1
yfinance==0.2.35
zipp==3.17.0