API request

spork
Posts: 4
Joined: Sat May 09, 2015 9:38 pm

API request

Postby spork » Sun Sep 06, 2015 10:50 pm

I'd love to see a simple API. A fancy REST or other XML based API would be fine, but simple would be even better, IMO. Personally, I love to be able to do something simple like "wget http://www.cfiresim.com?param=val&param2=val2.... and get a parsable answer like "fail_cycles:1,success_rate:77,computed_swr:4.5, ..."

Historically, I've been scraping this with perl's WWW::Mechanize... but between changes on both my end and yours, it's pretty broken lately. (Mechanize really can't handle javascript.)

User avatar
bo_knows
Site Admin
Posts: 660
Joined: Fri Jun 28, 2013 4:33 pm

Re: API request

Postby bo_knows » Tue Sep 08, 2015 12:12 pm

I would love to do this, but it's low on my priority list. Here's why:

There are a LOT of variables on the form page. And, many of them are dynamic. For instance, by default the form shows 2 pensions, but you can go up to 10. To encode all of that information into GET parameters, would probably end up going over the character limit for URLs.

In the future, I will look at a REST API. I'm actually moving (sometime soon) to a job that does a lot of REST, so if I get some more exposure to it, I might be able to implement it into cFIREsim.

TL;DR: I'll put this on the long-term list.
-Bo (Creator and Admin for cFIREsim)

spork
Posts: 4
Joined: Sat May 09, 2015 9:38 pm

Re: API request

Postby spork » Tue Sep 08, 2015 1:57 pm

Awesome.

I figure there aren't many folks (maybe I'm the only one) that actually want this. I totally understand the low priority.

I have disabled that graph for the time being

User avatar
bo_knows
Site Admin
Posts: 660
Joined: Fri Jun 28, 2013 4:33 pm

Re: API request

Postby bo_knows » Tue Sep 08, 2015 2:17 pm

Just out of curiosity, how were you using your web scraping script before? What sort of outputs were you measuring? Like a monthly report based on your mint.com account or something?
-Bo (Creator and Admin for cFIREsim)

spork
Posts: 4
Joined: Sat May 09, 2015 9:38 pm

Re: API request

Postby spork » Tue Sep 08, 2015 2:42 pm

I run several scenarios based on various data points. So I have varying inputs and outputs. The input numbers come from data stored in gnucash + current day stock/fund pricing. I've got a crapton of graphs I generate. Some have data going back to about 1994. (Obviously the cfiresim charts don't go back that far.)

Graphs are done made with cacti (a front end to rrdtool). It's really made to graph network data. Instead of generating new data every 5 minutes like you would with a router, I usually generate data once or twice a day -- giving strip charts going back in time.

Cfiresim Inputs:
* actual income/expense/value data based on the last 365 days.
* same thing repeated with monte carlo scenario
* same thing repeated to compute maximum spending level with current numbers to hit 100% success
* repeated again to compute minimum portfolio with current numbers to hit 100% success.
* some "what if" scenarios ... where my starting stash is $250k more, $500k more, 750k more, $1m more
* Then repeat all the above using data going back 5 years.

Outputs:
* for each scenario, i look at success/fail cycles
* annual expenses (assuming that is a variable in the scenario),
* final portfolio value
* min portfolio value (assuming that is variable in the scenario)

This was pre-FIRE for me... I FIRE'ed a couple of months ago and I haven't sat down and worked through what changes/additions I want in my graphing post FIRE. I suspect there will be a bit of rework.

User avatar
bo_knows
Site Admin
Posts: 660
Joined: Fri Jun 28, 2013 4:33 pm

Re: API request

Postby bo_knows » Tue Sep 08, 2015 7:39 pm

Sounds extremely intricate and personalized... I like it :)

Congrats on being FIRE. Though I love all of the talk of FIRE, and calculating it's position in my life, I'm still a number of years off. Ha!
-Bo (Creator and Admin for cFIREsim)


Return to “cFIREsim Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests