add python example for using shared library
add bindata script for transforming csv file into C
put data in header file directly
A simple C program to run the simulations from the Trinity study from your command line or from other programming languages through its shared library.
To run the simulation from the Trinity study using an initial capital of $1M, a $40K withdrawal rate, 0.15% yearly fees and a required duration of 30 years, run the following command:
trinity -c 1000000 -w 40000 -f 0.15 -d 30
Output:
Capital: 1000000.00
Withdrawal: 40000.00 per month
Fees: 0.15% per year
Duration: 30 years
Success ratio: 1404 / 1441 (97.43%)
Data is coming from from Robert Shiller's website and consists of S&P 500 stock returns & inflation data dating back to 1871. It is embedded in the binary, so the program runs regardless of its location on your filesystem.
Download one of the prebuilt binaries for your platform from the releases page or build from source using the instructions below.
git clone git@github.com:dannyvankooten/trinity.git
make
sudo make install
MIT licensed.