code to build the paper "Bound on Portfolio Quality".
2.9K
This repo holds the code to rebuild the paper, "Bounds on Portfolio Quality." There are a few ways to build the paper:
knitr and R. This will require
the following packages:
knitr, devtools, doFuture, doRNG, dplyr, ggplot2, hypergeo, knitr, LambertW,
quantmod, SharpeR, tidyr, xtable,
and aqfb.data, which is available from github viainstall_github("shabbychef/aqfb_data")
Then you can build via
knitr::knit('qbound.Rnw')
$ make docker_doc
The doc will be deposited in output/qbound.pdf.
$ docker pull shabbychef/qbound
$ mkdir ./output
$ docker run -it --rm -v $(pwd)/output:/srv/output:rw --entrypoint="make" shabbychef/qbound "doc"
The doc will be deposited in output/qbound.pdf. You can control the build
speed/resolution tradeoff with the environment variable RUNTIME_PARAM as
follows:
$ docker pull shabbychef/qbound
$ mkdir ./output
$ docker run -it --rm -v $(pwd)/output:/srv/output:rw -e RUNTIME_PARAM=50 --entrypoint="make" shabbychef/qbound "doc"
The simulations in this document can take several hours, but can take advantage of multicore
machines. To speed up the build with fewer simulations, either adjust the
variable RUNTIME_PARAM in the qbound.Rnw to default to a number bigger than 1, something like 50, say,
to get an approximately 50x speedup in simulation runtime. This can be
controlled via the environment variable of the same name:
$ RUNTIME_PARAM=50 make docker_doc
The version as published in the MDPI Journal of Risk and Financial Management can be made via a separate target:
$ make docker_mdpi
# or
$ docker pull shabbychef/qbound
$ mkdir ./output
$ docker run -it --rm -v $(pwd)/output:/srv/output:rw -e RUNTIME_PARAM=50 --entrypoint="make" shabbychef/qbound "mdpi"
Content type
Image
Digest
Size
928 MB
Last updated
over 7 years ago
docker pull shabbychef/qbound