I am looking for resources (if they exist) that explain the differences between quant finance software in academia and the real world, or explain how quant software is implemented in practice.
For example, in uni we learn the Black-Scholes formula and how to write it out in code, which is fairly simple. e.g.
import numpy as np
from scipy.stats import norm
def Black_Scholes(S: float, K: float, T: float, r: float, sigma: float) -> dict:
d1 = (np.log(S/K) + (r + sigma**2 / 2) * T) / (sigma * np.sqrt(T))
d2 = d1 - sigma * np.sqrt(T)
return {
"call": S * norm.cdf( d1) - K * np.exp(-r*T) * norm.cdf( d2),
"put": -S * norm.cdf(-d1) + K * np.exp(-r*T) * norm.cdf(-d2)
}
print(Black_Scholes(10, 10, 1, 0.05, 0.1)["call"])
print(Black_Scholes(10, 10, 1, 0.05, 0.1)["put"])
But as soon as I look at any serious open-source quantitative finance software (and presumably proprietary software too), the first thing I notice is there are many additional factors that need to be considered that receive little to no mention in any classroom I've been in.
For example, in QuantLib Python, to price a European option you do something like:
today = ql.Date().todaysDate()
riskFreeTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.05, ql.Actual365Fixed()))
dividendTS = ql.YieldTermStructureHandle(ql.FlatForward(today, 0.01, ql.Actual365Fixed()))
volatility = ql.BlackVolTermStructureHandle(ql.BlackConstantVol(today, ql.NullCalendar(), 0.1, ql.Actual365Fixed()))
initialValue = ql.QuoteHandle(ql.SimpleQuote(100))
process = ql.BlackScholesMertonProcess(initialValue, dividendTS, riskFreeTS, volatility)
engine = ql.AnalyticEuropeanEngine(process)
So to price a European option we need to implement (or use someone's implementation of) things like Dates and Term Structures, and even a Quote object. Using dates of course means day counting is required, which requires day counting conventions, and so on.
Then you might want to calibrate your model which is conceptually easy to do, but now that you have Dates and Quotes and TermStructures, how do you handle these ?
I've used option pricing as an example, but this applies to many more areas of QF.
So I'm wondering if there are any good references for all these considerations? I can read the QuantLib source (and I have read quite a bit of it), or other open-source projects, but this does not actually explain the leaps from academia to practice.
Thank you in advance for any help!
Note: I do have a copy of 'Implementing QuantLib'.
python
terrific. If you really want to get a taste of a practical financial institutions task you may want to see how the following tools work: Git, Tortoise, Bitbucket, Visual Studio, ... Participating in open source projects is a good idea but I don't know how much reputation you have to get so that your pull requests get accepted. If an institution pays you for programming this is quite different: $\endgroup$