Comments (1)
import copy
from simulator import Simulator
import simulator
from models.model import Model
import numpy as np
TRIALS = 30
RUN_QTYS = [100,200,500,1000,2000,3000,4000,5000,7000,10000]
simulator.DEBUG_LVL = 0
model = Model()
full_params = copy.deepcopy(model.params)
for runs in RUN_QTYS:
param_vals = {key:obj["val"] for (key,obj) in full_params.items()}
override_dict = {'monte_carlo_runs' : runs }
new_simulator = Simulator(param_vals,override_dict)
rates = []
for _ in range(TRIALS):
success_rate, _= new_simulator.main()
rates.append(success_rate)
print(f'Runs: {runs} | Range: {np.ptp(rates)*100:.2f}%')
Runs: 100 | Range: 5.00%
Runs: 200 | Range: 5.00%
Runs: 500 | Range: 3.80%
Runs: 1000 | Range: 2.00%
Runs: 2000 | Range: 1.55%
Runs: 3000 | Range: 1.20%
Runs: 4000 | Range: 1.45%
Runs: 5000 | Range: 0.94%
Runs: 7000 | Range: 0.84%
Runs: 10000 | Range: 0.89%
from lifefinances.
Related Issues (20)
- Use seeded random generation for testing
- Swap to np.arrays where appropriate
- Consider other optimization algorithms
- Stop simulation early if net worth hits 0 HOT 3
- Optimize children array creation
- Could you use a try/catch to quit the optimizer?
- Track start dates in the income profiles
- Switch allocation method to use Strategy Design Pattern
- Leaving old data in the database after transactions
- Improve aesthetics for the front end
- Enable CSRF
- Add data validation
- Rename income.Calculator
- Equity Target form option reset HOT 1
- Modularize simulation main loop
- Refactor income objects
- OO model econ_data_generator
- name 'webbrowser' is not defined HOT 2
- HTTP ERROR 403 - HOT 3
- TypeError: cannot set 'is_timeout' attribute of immutable type 'TimeoutError' HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lifefinances.