(preliminary title)
We formulate the classic portfolio optimization problem as a multi-stage stochastic programming problem, solve it using a genetic algorithm. The application allows the user to add allocation constraints, tune the parameters of the genetic algorithm, and edit the target funding ratio of the optimal portfolio.
The application is the result of a Master's Thesis, which (hopefully) will be published in June 2019.
The application can be found here.
- Clone this repository.
- Make sure Docker is installed
- Pull an image for compiling WebAssembly:
docker pull trzeci/emscripten
- Install depencencies:
npm install
- Compile the WebAssembly module:
npm run docker
- Start the application:
npm start
- Fire up
localhost:3000
in your browser.
There are tests written for both the genetic algorithm (C++) and the user interface (JavaScript).
Tests are run in CircleCI, but if you want to run the tests locally, you can do so by executing the docker
script in package.json
, and then executing the npm run test:app
script.
npm run docker && npm run test:app
As previously mentioned, you need to have Docker for it to work.
The application is currently hosted on GitHub Pages. Deployment is done easiest by executing the deploy
npm script.
npm run deploy
First
docker pull trzeci/emscripten
docker run --rm -v ${PWD}:/src -w /src -it trzeci/emscripten /bin/bash -c "emcc --bind -O3 -Ilibcapgen -s WASM=1 -s MODULARIZE=1 -s ENVIRONMENT=web -s EXPORT_NAME=libcapgen -o ./public/bin/libcapgen.js ./libcapgen/src/*.cpp"
Remember to build the WebAssembly modules before deployment: npm run docker
.
We use SemVer for versioning.
- Filip Hallqvist
This project is licensed under the MIT License - see the LICENSE file for details
Special thanks to Holger Rootzén for his constructive suggestions and insights during the research work. I am also particularly grateful for the assistance given by Tor Nordqvist and Martin Karrin at Captor for their invaluable feedback and help throughout the project.