RWWD, RWD, Drift, Mean
Posted: Tue Dec 29, 2020 5:45 am
Hi Tom,
I am modelling fx-rates, I would like to know if the the following 3 benchmark models are correctly specified (with forecasts) in RATS for the fx-rates RETURNS series, or are they only true for the fx-rates LOG-LEVELS series, or true for either RETURNS and LOG-LEVELS fx-rates series?:
(1) RWWD (RW without Drift) or naive model.
(2) RWD (RW with Drift) model,
including calculation of the Drift term for RWD model.
(3) MEAN/CONSTANT model.
Here's a reproducible example using the RATS dataset g10xrate.xls:
many thanks,
Amarjit
I am modelling fx-rates, I would like to know if the the following 3 benchmark models are correctly specified (with forecasts) in RATS for the fx-rates RETURNS series, or are they only true for the fx-rates LOG-LEVELS series, or true for either RETURNS and LOG-LEVELS fx-rates series?:
(1) RWWD (RW without Drift) or naive model.
(2) RWD (RW with Drift) model,
including calculation of the Drift term for RWD model.
(3) MEAN/CONSTANT model.
Here's a reproducible example using the RATS dataset g10xrate.xls:
Code: Select all
*===============================
* read in data
OPEN DATA "/Users/Shared/RATS/Examples/g10xrate.xls"
DATA(FORMAT=XLS,NOLABELS,ORG=COLUMNS,TOP=2) 1 6237 USXJPN USXFRA USXSUI USXNLD USXUK $
USXBEL USXGER USXSWE USXCAN USXITA
*
* transform data into log form
log USXJPN / lUSXJPN
*
* compute log returns
set dlUSXJPN = 100.0*( lUSXJPN - lUSXJPN{1} )
*
* view basic statistics
table / USXJPN lUSXJPN dlUSXJPN
*
*
*===============================
* Choose returns series
set y = dlUSXJPN
*
*
* (1) RWWD (RW without Drift) or naive model
set RWWD = y{1}
* Or
boxjenk(diffs=1,define=foreeq_RWWD_y) y 2 6236
uforecast(equation=foreeq_RWWD_y,from=(6236+1),steps=1) yhat_RWWD_y
* Or
equation(coeffs=1.0) eqn1_naive y
# y{1}
uforecast(equation=eqn1_naive,static,steps=1) eqn1_naive_fore
prin 6230 6237 y RWWD yhat_RWWD_y eqn1_naive_fore
* (2) RWD (RW with Drift) model
boxjenk(diffs=1,constant,define=foreeq_RWD) y 2 6236
uforecast(equation=foreeq_RWD,from=(6236+1),steps=1) yhat_RWD_y
prin 6230 6237 y RWWD yhat_RWWD_y eqn1_naive_fore yhat_RWD_y
* Drift or mean/constant term for RWD
diff y / dy
linreg(define=foreeq_DRIFT) dy 3 6236
# constant
uforecast(equation=foreeq_DRIFT,from=(6236+1),steps=1) yhat_DRIFT_y
* OR
boxjenk(diffs=0,constant,define=foreeq_DRIFTBJ) dy 2 6236
uforecast(equation=foreeq_DRIFTBJ,from=(6236+1),steps=1) yhat_DRIFTBJ_y
prin 6230 6237 y RWWD yhat_RWWD_y eqn1_naive_fore yhat_RWD_y yhat_DRIFT_y yhat_DRIFTBJ_y
* Check Equivalence RWD (RW with Drift) and results by hand
set RESULTSBH_DRIFT = RWWD + yhat_DRIFT_y
set RESULTSBH_DRIFTBJ = RWWD + yhat_DRIFTBJ_y
prin 6230 6237 y RWWD yhat_RWWD_y yhat_RWD_y eqn1_naive_fore yhat_RWD_y yhat_DRIFT_y RESULTSBH_DRIFT RESULTSBH_DRIFTBJ
* (3) MEAN/CONSTANT model
boxjenk(diffs=0,constant,define=foreeq_MEAN) y 2 6236
uforecast(equation=foreeq_MEAN,from=(6236+1),steps=1) yhat_MEAN_y
prin 6230 6237 y RWWD yhat_RWWD_y eqn1_naive_fore yhat_RWD_y yhat_DRIFT_y RESULTSBH_DRIFT RESULTSBH_DRIFTBJ yhat_MEAN_y
Amarjit