I am looking for alternatives to Quantlib. It is a great library but a bit of overkill for what I actually need - just pricing vanila options (with closed form and binomial/trinomial tree), interest rate swaps and cross currency swaps. I also don't like the SWIG wrappers of Quantlib and prefer a python or .NET native library, also need the library to be open-source. Any suggestions?
You could also look at the Julia programming language. Here is a whole page on asset pricing in Julia https://julia.quantecon.org/multi_agent_models/markov_asset.html The benefits of Julia right now is there are good libraries and learning material but no junk libraries to sift through like in python. Claude just wrote me an american option pricing function in Julia using a binomial tree. Another benefit of Julia is the language models aren't trained on all this garbage python code. All the public code is top notch for scientific computing in a specific field. The syntax is designed for python programmers. Jupyter notebooks will also work with Julia. Here are the results of the language model binomial tree function. It would be interesting to see how close this is from a well tested library or if this is pure nonsense. # Set option parameters S0 = 100.0 # Current stock price K = 100.0 # Strike price r = 0.04 # Risk-free rate sigma = 0.2 # Volatility T = 1.0 # Time to maturity (years) N = 250 # Number of time steps American Call Price: 9.9171 American Put Price: 6.4007 It won't allow me to upload the .jl file.