Contains a mathematical optimization project implemented in Python
In this project we are given a dataset that contains the exchange rate of the Euro against the US Dollar for a period of 180 days and our task is to predict as accurately as possible the exchange rate for the last
Let
A model that combines all
Finding the weights:
As optimality criterion we will use the minimization of the mean square error of the predicted values for the last
Let
then the objective function is the following:
with the minimizers of the above function being the (sub) optimal weights used in forecasting the desired times.
- Steepest descent
- Newton
- BFGS
- BFGS
Predict the last
-
$M_{1}$ : simple moving average (SAS) with$\xi = 1$ -
$M_{2}$ : simple moving average (SAS) with$\xi = 5$ -
$M_{3}$ : simple exponential smoothing (SES) with$\alpha = 0.2$ -
$M_{4}$ : simple exponential smoothing (SES) with$\alpha = 0.8$ -
$M_{5}$ : linear exponential smoothing (LES) with$\alpha = 0.3, \beta = 0.1$ -
$M_{6}$ : linear exponential smoothing (LES) with$\alpha = 0.3, \beta = 0.5$
Python v.
Numpy v.
python3 project_1.py <int> <int> <string>
First <int>
: number of days to predict
Second <int>
: descent direction, integer in range
- Steepest descent
- Newton
- BFGS
Third <string>
: method - LS
for Line Search / TR
for Trust Region
ex. Predicting the last 15 days using Newton descent direction with Wolfe conditions Line search command:
python3 project_1.py 15 1 LS