A Guide to Using techtonique.net’s API and rush for simulating and plotting Stochastic Scenarios

[This article was first published on T. Moudiki's Webpage - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Yesterday’s blog post demonstrated how to use the (work in progress) stochastic simulation API provided by techtonique.net, to generate scenarios. 100 API requests are now (and forever) offered to every user, no matter the pricing tier. We explored how to simulate paths using the popular:

  1. Geometric Brownian Motion (GBM)
  2. Cox-Ingersoll-Ross (CIR) process
  3. Ornstein-Uhlenbeck (OU) process
  4. Gaussian Shocks scenarios

In today’s post, we’ll see how to use rush and the stochastic simulation API provided by techtonique.net to plot simulation results.

First, you need to install rush. Here is how I did it:

cd /Users/t/Documents/Python_Packages
git clone https://github.com/jeroenjanssens/rush.git 
export PATH="/Users/t/Documents/Python_Packages/rush/exec:$PATH"
source ~/.zshrc # or source ~/.bashrc
rush --help # check if rush is installed

Now, download and save the following script in your current directory (note that there’s nothing malicious in it). Replace AUTH_TOKEN below by a token that can be found at techtonique.net/token:

Then, at the command line, run:

./fetch_and_plot_rush_techtonique.sh

The result plot can be found in your current directory as a PNG file named plot.png.

image-title-here

To leave a comment for the author, please follow the link and comment on their blog: T. Moudiki's Webpage - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)