#!/bin/sh
# Script file to run all programs consecutively
echo Starting and ending times: > excl/timeunix.txt
date>>excl/timeunix.txt

# Give plots on the data set
oxl plotdaty

# Choose the length of the samples, short or long
cp decl/sample/mhshort.dec mhsamp.dec
cp decl/sample/gibshort.dec gibsamp.dec
#cp decl/sample/mhlong.dec mhsamp.dec
#cp decl/sample/giblong.dec gibsamp.dec

# Work on the WN model; MH sample, marginal likelihood through kernel
# and Gibbs models, and calculating predictive density
cp decl/mamhdu.dec simox.dec
oxl mhflex6
oxl mlkern
oxl mlwn
oxl calcdre4
oxl numacc3

# Work on the LL model
cp decl/mbmhdu.dec simox.dec
oxl mhflex6
oxl mlkern
oxl mlgas6
oxl calcdre4
oxl numacc3

# Work on the GLL model
cp decl/mcmhdu.dec simox.dec
oxl mhflex6
oxl mlkern
oxl mlgas6
oxl calcdre4
oxl numacc3

# Work on the GLL-GARCH model
cp decl/mdmhdu.dec simox.dec
oxl mhflex6
oxl mlkern
oxl mlgas6
oxl calcdre4
oxl numacc3

# Work on the GLL-SV model; Gibbs sample+predictive density, and
# marginal likelihood
cp decl/megdu.dec simox.dec
oxl gibsv20
oxl mlgsv3
oxl numacc3

# Work on the GLL-Student t model; Gibbs sample+predictive density, and
# marginal likelihood
cp decl/mfgdu.dec simox.dec
oxl gibgas20
oxl mlgas6
oxl numacc3

# Work on the GLL-GARCH-Student t model; Gibbs sample+predictive density, and
# marginal likelihood
cp decl/mggdu.dec simox.dec
oxl gibgas20
oxl mlgas6
oxl numacc3

# (Re)calculate the hedging results, plot and tabulate
oxl hedrat7 

# Calculate coverage probabilities of predictive densities
oxl foreris2

# Analyze the posterior density
oxl postana6

date>>excl/timeunix.txt
cat excl/timeunix.txt
