# Financial software: academia vs. real world [closed]

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'.

• If you are considering to leap from academia to practice don't worry. The typical task for a programmer and quant in any financial institution is to navigate through code written by others. There is no reference that could prepare you for all the details to come. On the other hand I found more helpful teamwork there than in any other institution I have been at. Commented Aug 29, 2023 at 19:18
• For the fixed income world I'm personally working a project available at github.com/attack68/rateslib. Unfortunately I haven't finished or released the accompanying book yet, but yes you're right, a big part of that library (50%) was putting in the building blocks: auto diff, day count, calendars, interpolation, and scheduling. Without any of that it was impossible to generalise to cover the full scope of securities and derivatives.
– Attack68
Commented Aug 29, 2023 at 20:33
• Adding to Kurt G'd excellent comment, no single implementation is "complete". Quantlib is great but doesn't handle details like expiry vs delivery date. For equity, many options are American and dividends are discrete and unknown. There is no single model that is being used. Its kind of hard to write a book about this because the money is not in details that a handful of people really need or desire. If you offer Python for beginners on Udemy, you get hundreds of thousands of students. Python for experts gets you a few hundred sign-ups. Commented Aug 29, 2023 at 22:32
• @FISR Remaining time in academia is probably better spent in deeply learning the theoretical stuff, surely accompanied by crunching numbers using your favourite programming language. I find 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: Commented Aug 30, 2023 at 6:35
• Also: quite a lot of time at work you will spend by communicating with people about their questions and helping them with their programming tasks. QSE is the prime platform to practice those things. Try to answer a few questions here. Commented Aug 30, 2023 at 6:42