~dvko/trinity

C program that runs the Trinity study SWR simulation using custom parameters
fcee678c — Danny van Kooten 1 year, 10 months ago
add python example for using shared library
931eae20 — Danny van Kooten 1 year, 10 months ago
add bindata script for transforming csv file into C
cc02f55c — Danny van Kooten 1 year, 10 months ago
put data in header file directly

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~dvko/trinity
read/write
git@git.sr.ht:~dvko/trinity

You can also use your local clone with git send-email.

#Trinity CLI

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.

#Usage

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.

#Installing

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

#License

MIT licensed.