- Proper train/validation/test split, hyperparameter tuning with cross-validation, MAPE evaluation
- From raw data acquisition to interpretable forecasts with confidence intervals
- Clear documentation and analysis of model behavior
# Clone and install
git clone https://github.com/mertso13/fx-prophet
cd fx-prophet
pip install -r requirements.txt
# Run notebook
jupyter notebook usd_try_forecasting.ipynbdocker build -t fx-prophet .
docker run -p 8888:8888 fx-prophet
# Open URL with token from terminal outputThe raw data we're working with shows significant volatility, especially post-2020, reflecting Turkey's economic conditions.
I started the training data after 2020 because there weren't any significant jumps in the graph until then.
Things got “interesting” after that point, so to speak.
The width of the light blue areas, which is the width of the interval, shows how honest the model is with us. Since Turkey's economy is not stable and predictable, the model has to give a wide range, and as the period it tries to predict increases from the present, this range also increases.
src/
├── __init__.py # Module initialization
├── fetch_util.py # Data fetching from Yahoo Finance
├── model.py # Prophet model training & hyperparameter tuning
└── plot_util.py # Visualization & quarterly/yearly analysis
usd_try_forecasting.ipynb # Main analysis: USD/TRY 2026 forecast
| Period | Expected Rate | 95% Confidence Interval |
|---|---|---|
| Q1 2026 | 44.08 | [43.59, 44.58] |
| Q2 2026 | 46.31 | [44.14, 48.39] |
| Q3 2026 | 48.51 | [42.34, 54.28] |
| Q4 2026 | 49.83 | [38.63, 60.57] |
Insight: The model captures the historical volatility of USD/TRY (Turkish economic inflation) and reflects this uncertainty in wider confidence intervals, showing it learned realistic patterns from data.
- Data: Historical daily rates (2010-01-01 to 2026-02-03) from Yahoo Finance
- Split:
- Train: 2020-2024 (1,044 days)
- Validation: 2024-2025 (261 days)
- Test: 2025-2026 (279 days)
- Tuning: Cross-validation on training set to find optimal
changepoint_prior_scale - Test Validation: Trained model on train+val, evaluated on held-out test set
- Final Model: Trained on extended dataset that includes test set with optimal
changepoint_prior_scale - Forecast: 365-day outlook with uncertainty quantification
This project properly separates concerns:
- Hyperparameters tuned on train set only using cross-validation (val/test sets untouched)
- Validation set used to evaluate tuned model performance
- Test set held completely out to measure generalization
- Final model trained on extended dataset with learned hyperparameters for production forecasting
- Python 3.10+
- See
requirements.txtfor full dependencies
Disclaimer: This model’s predictions are just for learning. It’s clueless about big world events, economic policies. Don’t take them as financial advice.


