{"id":18472622,"url":"https://github.com/fziviello/forecast-trading","last_synced_at":"2026-02-15T16:03:05.492Z","repository":{"id":260444514,"uuid":"881316506","full_name":"fziviello/Forecast-Trading","owner":"fziviello","description":"Trading Forecast Generator","archived":false,"fork":false,"pushed_at":"2024-12-09T11:25:11.000Z","size":608,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T02:47:04.828Z","etag":null,"topics":["ai","data-science","forex","python","stock"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fziviello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-31T10:31:51.000Z","updated_at":"2024-12-09T11:25:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"1209e3df-4157-43e0-9ddc-ecc786ab9a5a","html_url":"https://github.com/fziviello/Forecast-Trading","commit_stats":null,"previous_names":["fziviello/forecast-trading"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fziviello/Forecast-Trading","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fziviello%2FForecast-Trading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fziviello%2FForecast-Trading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fziviello%2FForecast-Trading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fziviello%2FForecast-Trading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fziviello","download_url":"https://codeload.github.com/fziviello/Forecast-Trading/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fziviello%2FForecast-Trading/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29483312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","data-science","forex","python","stock"],"created_at":"2024-11-06T10:21:17.454Z","updated_at":"2026-02-15T16:03:05.455Z","avatar_url":"https://github.com/fziviello.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Model Training\n\nThe script contains that schedules model training.\n\n## Customizable Parameters\n\nYou can change them in the config.py file\n\n- `TIME_MINUTE_REPEAT`: Interval expressed in minutes of the schedule\n- `N_REPEAT`: Number of repetitions\n\n## Args Parameters\n\n- `SYMBOL`: The Name of Stock Exchange Symbol separated by comma for multi-currency training (--symbol) *REQUIRED\n- `NOTIFY`: If True send the predictions to Telegram Channel\n- `SEND_SERVER_SIGNAL`: If True send signal to MT5 Server\n\n## Run\n\n- Start Training : `python3 scripts/training.py --symbols AUDJPY,AUDNZD,AUDCHF,SGDJPY,AUDCAD --notify True --sendSignal True`\n\n# DataSet Generator\n\nThis Python script retrieves historical Forex data for a specified symbol using the `yfinance` library\nThe data can be visualized in a candlestick chart and saved to a CSV file\n\n## Features\n\n- Retrieves historical Forex data for a specified symbol\n- Visualizes the data in a candlestick chart if enabled\n- Saves the data to a CSV file named `DATASET_{SYMBOL}.csv`\n\n## Customizable Parameters\n\nThe script contains several parameters that you can modify to suit your needs:\n\n- `SHOW_PLOT`: If True Show the plot\n- `RETRY_LIMIT`: Times to retry in case of error\n\n## Args Parameters\n\n- `SYMBOL`: The Name of Stock Exchange Symbol (--symbol) *REQUIRED\n- `INTERVAL`: Dataset Range (--interval)\n- `GENERATE_PLOT`: If True Make the plot (--plot)\n\n## Run\n\n- Create DataSet: `python3 scripts/create_dataSet.py --symbol AUDJPY`\n\n# Forecast BOT\n\nThis script implements a Long Short-Term Memory (LSTM) neural network for predicting trading signals in Forex markets. It leverages historical price data to generate buy/sell signals, calculate potential profits and losses, and save predictions to a CSV file. The model also includes functionality for plotting results and managing previous model states. Can you see running on https://www.mql5.com/it/users/fziviello87\n\n## Features\n\n- Data Processing: Loads and preprocesses Forex historical data\n- Model Training: Trains an LSTM model to predict trading signals based on historical data\n- Predictions: Generates buy/sell signals and calculates potential profits and losses\n- CSV Management: Saves predictions to a CSV file with options to overwrite existing data\n- Visualization: Generates plots to visualize trading signals against historical prices\n- Early Stopping: Implements early stopping to prevent overfitting during model training\n\n## Usage\n\nUse the dataset created with the script `create_dataSet`\n\n## Dynamic Parameters\n\n- `REPEAT_TRAINING`: If True restarts model training\n\n## Customizable Parameters\n\n- `USE_SERVER_MT5`: If True required MT5 server ON\n- `GENERATE_PLOT`: If True Make the plot\n- `SHOW_PLOT`: If True Show the plot\n\n### Business Parameters\n\nYou can change them in the config.py file\n\n- `MAX_MARGIN`: Maximum margin on price\n- `MIN_MARGIN`: Minimum margin on the price\n- `LOT_SIZE`: The number of lots\n- `CONTRACT_SIZE`: Standard volume for one Forex lot\n- `EXCHANGE_RATE`: The exchange rate for profit calculations\n- `FAVORITE_RATE`: Preferred conversion currency (EUR)\n- `N_PREDICTIONS`: The maximum number of predictions to generate\n- `VALIDATION_THRESHOLD`: Model Validation Threshold\n- `INTERVAL_MINUTES`: Dataset interval in minutes\n- `RETRY_LIMIT`: Maximum number of retry\n- `INTERVAL_DATASET`: Dataset interval in desired format\n- `FORECAST_VALIDITY_MINUTES`: Validity of the forecast\n- `TIME_MINUTE_REPEAT`: Repeat Training time\n- `N_REPEAT`: Number of Repeat Training\n- `BOT_TOKEN`: Token API Bot Telagram\n- `CHANNEL_TELEGRAM`: Telegram Channel Name with @\n- `PARAM_GRID`: Neural Network Parameters \n  - `units`: The number of neurons in the LSTM layers\n  - `dropout`: The dropout rate to prevent overfitting\n  - `epochs`: The number of training epochs\n  - `batch_size`: The size of the batches used during training\n  - `learning_rate`: The learning rate to optimize the weights\n  - `optimizer`: The optimization algorithm (e.g. adam, rmsprop)\n\nFor env management you can create the `secret.env` file in the project root where you can create the production keys\n\n## Args Parameters\n\n- `SYMBOL`: The Name of Stock Exchange Symbol (--symbol) *REQUIRED\n- `GYM`: If True bypass check status market\n- `SEND_SERVER_SIGNAL`: If True send signal to MT5 Server\n- `NOTIFY`: If True send the predictions to Telegram Channel\n- `FAVORITE_RATE`: Favorite conversion rate (--favoriteRate) (default EUR)\n- `INTERVAL_MINUTES`: Interval expressed in minutes to align with the dataset (--interval)\n- `GENERATE_PLOT`: If True Make the plot (--plot)\n\n## Run\n\n- Start Forecast: `python3 scripts/forecast_bot.py --symbol AUDJPY --notify True --sendSignal True`\n\n# Calculate Statistics\n\nThis script calculates the statistics obtained by the model during its training.\n\n## Customizable Parameters\n\n- `PREFIX_VALIDATION`: Validation file name prefix \n\n## Args Parameters\n\n- `SYMBOL`: The Name of Stock Exchange Symbol (--symbol) *REQUIRED\n- `ALL`: Analyze all available validation files (--ALL) *REQUIRED\n- `NOTIFY`: If True send the predictions to Telegram Channel\n- `GENERATE_PLOT`: If True Make the plot (--plot)\n\n## Run\n\n- Start Get Statistics for ALL symbol availables: `python3 scripts/get_statistics.py --ALL --notify True`\n- Start Get Statistics for single symbol: `python3 scripts/get_statistics.py --symbol AUDJPY --notify True`\n\n### Use Venv\n\n- `python3 -m venv .venv`\n- `source .venv/bin/activate`\n- `.venv/bin/python`\n\n## Requirements\n\n`pip3 install -r requirements.txt`\n\nif you have problems installing ta-lib proceed as follows\n- `brew install ta-lib`\n- `TA_INCLUDE_PATH=$(brew --prefix ta-lib)/include`\n- `TA_LIBRARY_PATH=$(brew --prefix ta-lib)/lib`\n- `CFLAGS=\"-I$TA_INCLUDE_PATH\" LDFLAGS=\"-L$TA_LIBRARY_PATH\" pip install ta-lib`\n\nif you use windows:\n- Download ta-lib precompiled `https://sourceforge.net/projects/talib-whl` and move into venv dir\n- Run `pip install path\\to\\ta_lib‑0.4.0‑cp310‑cp310‑win_amd64.whl`\n\n\nTo use the `SEND_SERVER_SIGNAL` functionality you can use APIM MT5 \n- `https://github.com/fziviello/APIM_MT5`\n\n\n![screenshot1](/Screenshot_1.png?raw=true)\n\n![screenshot1](/Screenshot_2.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffziviello%2Fforecast-trading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffziviello%2Fforecast-trading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffziviello%2Fforecast-trading/lists"}