Skip to content

Releases: yeonholee50/AmpyFin

Historical Data Caching + Suggestion Heap Completed

23 Dec 16:57
Compare
Choose a tag to compare

As per result of training, I was able to find the ideal performance for each indicator and have published the results in the repository.

The setup.py initializes what the ideal period for each indicator is. These periods are results from running data worth 24 years across different asset groups.

Historical data will be called for each indicator and each strategy from now on. Previously this caused problems because of yfinance policy of rate limiting. Using cache and incremental delays, we were able to solve this problem - a workaround if you want to call it that.

We also included a suggestion heap that will suggest the bot buy based on buy_weight - sell_weight. This is secondary with primary still being the buy heap. Current training based on this updated indicator is being done so please note that the indicator ranking on the website is not accurate for at least until January 1, 2025 which is the approximate date that the training should be done based on updated codebase.

Improvements to be made:
Sharding. Currently, there will be 3 minute delays on rank to give time for trading to catch up but sharding will improve performance speed of trading client.

Ta-Lib incorporated and threading for rank completed

07 Dec 22:42
Compare
Choose a tag to compare

First of all, thank you for all the feedback. The project isn't perfect, but we're trying to develop it so that it performs how we would want it to.

Version 2.0.1 will include the following features:

  • Elimination of all previous strategies. We will use indicators instead from TA-lib as suggested by many. This will also mean scrapping the training data. However, the training data that will be shown in the website will be staying for at least 1 more week - we have already started training using the current indicators using a 1d tick. 1m tick training has also started, but this won't be available to the public. For those still interested in the strategies previously indicated, they will be in the strategies/archived_strategies/* folder. Ta-lib is a separate project of its own and the link to installing it has been put in the README.

  • Threading in ranking_client.py has been fully implemented. Previously there was SLL handshake error, but this has since been resolved. Please keep in mind there will be warning message of cache being full but this is so that the system throws away the threads that have been completed so other threads can take its place.

  • Setup has now been tested successfully on three separate laptops. There was previously error on the setup script, but this issue has since been resolved.

  • Ensemble learning will still continue, but we will continue to use static methods to rank strategies. Later on, we will use dynamic strategies by tinkering with the period param in get_data - adjusting how far the historical data to each strategy will be from - too much and it's a long term bot and unresponsive. too short and it's too reactive, unpredictable, inconsistent, and overfitting on the dataset. Right now, it is defaulted to use 1y param.

Notice:

  • The website currently showing the live performance and holding will still be up for everyone to see and use. There will be a maintenance later next week (12/8 ~ 12/14). During this maintenance, it will accommodate the recent changes that were made to the project. Also the live performance statistics will be unreliable during this week, so immediate apologies.

Conclusion:
Thank you to everybody who contributed to the project so far. I personally learned about a lot of tools and new ways to approach this project in recent week.There are still a lot of issues and enhancements to be made. For further inquires, please don't hesitate to reach out to me at [email protected]

Update - 12/11/2024:
Maintenance on the website has now been completed. Currently, the trained data for 6 months is showing and it will continue to update as the days go by using data it accumulates in the coming days. I will do another maintenance after training in Intrinio which is estimated to be in Jan 20, 2025 - Jan 22, 2025. Thank you for your understanding.

Last Update - 12/17/2024:
There has been several issues on MongoDB trying to a be accessed even after closing. Obviously closing after access is best practice, but this has been causing issue in ranking. This issue has now been resolved. The bot is free to be used with 0 functional issues. Also, the website will undergo a maintenance scheduled 12/18/2024 at 12:00 AM to 2:00 AM EST for data swapping as AmpyFin (containing TA-Lib strategies )has now been successfully trained using data from 2000 - present as of two days ago. This was done using distributed training which took about a week using Lambda Labs distributed Cloud GPUs. The training was done on a 1m tick. It was done using current holdings on the static NDAQ-100 instead of dynamically changing NDAQ-100 as I am still looking into resources for changes in the NDAQ-100 and implementing the API myself sometime later. Special thanks to those who DMed about this resource. Future change as expected will be to expand outside the NDAQ-100 and into NDAQ and NYSE listed securities which will require new training scheme.

Final Release - Published

04 Dec 04:22
Compare
Choose a tag to compare

AmpyFin Endpoints have been configured -all 4 POSTS. Trained data and profit can be viewed via web

Created First API Endpoints

02 Dec 19:15
Compare
Choose a tag to compare

Created a basic website that allows the viewing of the bot's live progress and rankings of each algorithms which highest being the best and lowest being the worst
Also configured 2 major API endpoints to be used in future web dev. Further web dev will continue using those 2 endpoints along with further endpoints such as:
% profit from initial compared to ndaq, spy, and qqq.
holdings of each algorithms

The next website will be done using a framework - possibly django or react - depends.

V1.0.2 - Official AmpyFin Release - Robust and Live

28 Nov 18:01
Compare
Choose a tag to compare

ConnectionError to Stack Retrival Issue Resolved.
Implemented 10 more strategies for base analysis using Rank.
More robust ranking algorithm implemented by accounting for number of successful trades rather than amount of profit.

Full Changelog: v1.0.1...v1.0.2

Dynamic Cash Flow and Asynchronous Strategy Clients Resolved

11 Nov 18:03
Compare
Choose a tag to compare

Summary of Development Update
Resolved Issues:

Dynamic Cash Flow Problem: Traders can now dynamically check cash flow before executing trades, ensuring smoother operations.
Rank Strategy: Clients can run asynchronously using non-promises, reducing busy waiting and improving efficiency.

New Features Added:

Precedence-Based Trading: Implemented a feature to prioritize buying based on the buy-sell coefficient difference, optimizing trading decisions.

Persistent Issues:

Trade Logging: Successful and failed trades are still not being logged properly, requiring further investigation.

Next Features to Implement:

Threading for Strategy Execution: Implement threading for each strategy within the ranking client to enhance concurrency.
Dynamic Quantity Calculation: Introduce dynamic quantity calculations for each strategy.
New Strategies and Quantities: Develop and integrate additional strategies and quantities.
Quantifiable Buy-Sell Decision: Implement a quantifiable buy-sell decision metric and reset the time_delta to improve tracking once trade logging is resolved.

AmpyFin V1.0

31 Oct 03:05
Compare
Choose a tag to compare

We’re excited to announce the initial release of the Trading Bot! This version lays the foundation for automated market analysis and trading, equipped with essential functionalities for ranking, trading, and logging activities.
It currently supports all four main functionalities:

  • Data Ranking: Automatically ranks stocks based on customizable criteria, providing prioritized trade candidates.
  • Automated Trading Execution: Executes trades based on ranked data, with a modular structure to support various trading strategies.
  • Logging: Comprehensive logging of major events and errors, including API errors, MongoDB operations, and market status checks, saved to system.log for easy tracking.
  • Usage Limits: Monitors API call limits (250 calls/day per Polygon API free tier), with notifications as limits are approached.

Next features to look forward to:

  • Time spent running a full trade simulation is roughly 5 minutes, so threading may be introduced for each strategy during rank.
  • Robust restriction on day trading will be implemented.
  • Additional algorithm will be added and existing algorithms will be improved in the quantity suggestion return field.