The Oracle, predict the stock market 💸
The Oracle is a Python library that uses several AI prediction models to predict stocks returns over a defined period of time.
It was firstly introduced in one of my previous package called Empyrial.
Disclaimer: Information is provided 'as is' and solely for informational purposes, not for trading purposes or advice.
How to install 📥
pip install the-oracle
How to use 💻
from the_oracle import oracle
oracle(
portfolio=["TSLA", "AAPL", "NVDA", "NFLX"], #stocks you want to predict
start_date = "2020-01-01", #date from which it will take data to predict
weights = [0.3, 0.2, 0.3, 0.2], #allocate 30% to TSLA and 20% to AAPL...(equal weighting by default)
prediction_days=30 #number of days you want to predict
)
Output
About Accuracy
| MAPE | Interpretation |
|---|---|
| <10 | Highly accurate forecasting 👌 |
| 10-20 | Good forecasting 🆗 |
| 20-50 | Reasonable forecasting 😔 |
| >50 | Inaccurate forecasting 👎 |
Models available
| Models | Availability |
|---|---|
Exponential Smoothing |
✅ |
Facebook Prophet |
✅ |
ARIMA |
✅ |
AutoARIMA |
✅ |
Theta |
✅ |
4 Theta |
✅ |
Fast Fourier Transform (FFT) |
✅ |
Naive Drift |
✅ |
Naive Mean |
✅ |
Naive Seasonal |
✅ |
Stargazers over time
Contribution and Issues
The Oracle uses GitHub to host its source code. Learn more about the Github flow.
For larger changes (e.g., new feature request, large refactoring), please open an issue to discuss first.
- If you wish to create a new Issue, then click here to create a new issue.
Smaller improvements (e.g., document improvements, bugfixes) can be handled by the Pull Request process of GitHub: pull requests.
-
To contribute to the code, you will need to do the following:
-
Fork The Oracle - Click the Fork button at the upper right corner of this page.
-
Clone your own fork. E.g.,
git clone https://github.com/ssantoshp/The-Oracle.git
If your fork is out of date, then will you need to manually sync your fork: Synchronization method -
Create a Pull Request using your fork as the
compare head repository.
You contributions will be reviewed, potentially modified, and hopefully merged into the Oracle.
Contributions of any kind are welcome!
Acknowledgments
- Unit8 for Darts
- @ranroussi for yfinance
- This random guy on Python's Discord server who helped me
Contact
You are welcome to contact us by email at santoshpassoubady@gmail.com or in Empyrial's discussion space
License
MIT
Metadata
Release files for the-oracle 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| the_oracle-0.1.2.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| the_oracle-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / the_oracle-0.1.2.tar.gz
| Download URL | the_oracle-0.1.2.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ed2d748bf65e808489bfcee04dfa68f37b620a6b8ed4220fa6803746bfb8574
|
|
BLAKE2b-256 checksum How to use checksums |
1950888eabed93a4d8003dd65b4f5b6ddb1f41a758168d4d6deed2dcd07e18dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Release files / the_oracle-0.1.2-py3-none-any.whl
| Download URL | the_oracle-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13902b40a990770a967dca18edbbddedc3eef623e425e368064b4a37ecc724d9
|
|
BLAKE2b-256 checksum How to use checksums |
46ebe6774edb788e1c0d801e7e010efdbf85b75c8a42f6dedd36db744ef0f3f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Security for the-oracle 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.