Add an API endpoint for Portfolio Simulations

Project

Add ability to run a portfolio simulation using the API. Time to complete is approximately 2 weeks.

Your Pledge (goal $7,500)

  • $2,000
  • $500
  • $200
0 voters

Special Terms

Pledges of $500 also receive 50,000 API credits. Pledges of $2,000 receive 500,000 API credits.

General Terms

By voting you agree to be billed the amount pledged if we decide to do this project. You can retract your pledge anytime before the project kicks off.

Specs

Enable modifications of:

  • Name, benchmark, slippage, and price for transactions (General tab)
  • Ideal size of a new position, rebalance frequency (Rebalance tab)
  • Universe and ranking system (Universe & Ranking tab)
  • Buy and sell rules (modify: add, remove, change)
  • Period (Period & Restrictions tab)

Output:

  • Date Period, Return%, Active%, Annualized%, Sharpe, StdDev, Ddown%, Corr, Value$, Cash$, Winners%, AnnualTurnover%, Beta, R-Squared, Alpha%
  • Return by calendar year
  • Time series
1 Like

This would be very useful, but could you expand a bit on the API cost? Let's say I run a screen backtest through the API, how much more expensive would a similar Portfolio Simulation be, in terms of API credits? I don't need a precise answer, a rough approximation is more than enough.

Same. 5 credits

1 Like

Lolol. I'm surprised no one else voted for this. Do people really just manually configure every sim and then sit and wait until it finished and then repeat? If you have a list of say 500 formulas you want to try to see if they improve your model's returns and 5 variations of regions, weights, etc. That's 2,500 sims you'd have to do manually which would probably take a whole year versus a single click of a button.

Anyone currently automating that process here somehow?

There is a way to automate this if you're an ultimate member. Click on "Research," then under "Tools" click on "Optimizer Studies." Click "New" and then choose "Trading System Study." You can then edit all the different parameters in your simulation and test various combinations.

I don't use this method myself, and would find an API endpoint far more convenient and flexible.

1 Like

Exactly my perspective, Yuval.

Oh, thanks Yuval! I didn't know that!! That could be super helpful at least!