A set of Python libraries I've written that have general purpose utility across many different types of problems
Various analytical finance tools including:
- Net Present Value (NPV)
- Internal Rate of Return (IRR)
- Investment Growth Projection
- Income Tax calculation
# Calculate IRR, using a DataFrame of cashflows with 'date' and 'amount' columns
irr = finance.xirr(df)
Module for creating report outputs from DataFrames and other inputs, for export to HTML, PDF, etc...
Set of utilities for conducting Monte-Carlo simulations
import simulation as mc
# Make some input random variables
a = mc.Norm(interval=(5, 10)) # 90% confidence interval
b = mc.Norm(interval=(5, 10), proportion = 0.95) # 95% CI
c = mc.Norm(mean=0, sd=1)
d = mc.Binom(p=0.75) # 75% chance of 1, 25% chance of 0
print(c.s) # single sample
# Make a function that returns a single sample
stackup = lambda: a.s + b.s - c.s + 10 * d.s
sim = mc.Simulation(f=stackup)
sim.run()
Module for statistical analysis of datasets, oriented towards manufacturing statistics