Serving the Quantitative Finance Community

 
User avatar
victor123
Topic Author
Posts: 0
Joined: August 26th, 2006, 8:42 pm

Implementing a model

February 10th, 2012, 12:59 pm

I have a few questions around model implementation.(1) Is this considered a Quant OR an IT job ?(2) Does it refer to developing excel s/sheets or C++ to implement various calculations relating to a model ?(3) What kind of things one needs to keep in mind while implementing a model ?(4) Could there be different ways to implement the same model ? If so in what sense (give examples if possible) ?(5) If the above is true, how to go about choosing the best approach ?Thanks for your help in advance :-)
 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

Implementing a model

February 10th, 2012, 1:57 pm

(1) In fact it would depends. You have several steps in model implementation-creating the model (so that's the math part) (quant)-developping the algos to solve it and to calibrate it (that's the numeric part) (half quant/half IT)-coding it (that's the boring part, at least to me ) (pure IT)then you will have the backtesting and so onPURE implementation id est CODING is not a quant job for me, it's an IT one. There is nothing relating to "quantitative" if you are given the model and the algos and all your work is typing it(2) As far as I know Excel VBA is SLOWLY disapearing replaced by more evolved languages such as C++ or Java (C seems to be popular too). I'm often surprised with Matlab or Python is not more used in the finance industry. For the first one I can guess it's that because it's fucking slow but well for the second I don't know.(3) For me the most important in a code is readibility (I don't want to spend 10 hr in understanding what a guy wrote), extendibility (the possibility to modify and improve it quickly) and integrability (the possibility to incorporate it in a bigger environment). Obviously your code has to be reliable and quick. Usually you have no freedom about the language to use, the method of programmation to use and since you are working in an environment with a lot of objects, sturctures, templates and libraries in fact you have very little freedom for innovative revolutionnary programming. The model has to be implemented for production in a efficient and robust manner. You don't have to reinvent the wheel.(4) For coding part you don't have much a choice. The hardest choices is for the algos and the numerical methods. Finite Difference Methods or Monte Carlo ones is often the question you would have to aks yourself.Consider the Heston model for example-you could use finite difference methods (explicit, implicit, Crank Nicholson, ADI and pretty sure ADE) -you could use Monte Carlo methods (explicit euler, exact scheme and after that all the variance reduction techniques)-you could use the closed form formula for vanillas (direct quadradure, FFT)It's here that you have to make your choice. (5) The best approach for choosing the numerical method is -analyze the dimension of the problem -analyze the complexity of the payoff(it would give you the wide choice between FDM, MC or closed form, by the way closed form is only 0.1% of the times and I'm generous in the percentage)-analyze your need in the final product (it has to be quick ? it has to be very precise ?-analyze how long you want to spent in implementing it (debugging included)If you need your code for tomorrow I'm guessing that you won't implement first a quasi Monte Carlo method with low discrepancy number and control variate.That's my advice.
 
User avatar
victor123
Topic Author
Posts: 0
Joined: August 26th, 2006, 8:42 pm

Implementing a model

February 11th, 2012, 12:56 am

Thanks a lot, very helpful..
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Implementing a model

February 11th, 2012, 8:11 am

Quote(2) As far as I know Excel VBA is SLOWLY disapearing replaced by more evolved languages such as C++ or Java (C seems to be popular too). I'm often surprised with Matlab or Python is not more used in the finance industry. For the first one I can guess it's that because it's [...] slow but well for the second I don't know. Don' forget C#. I suppose Matlab is too slow/memory problems for production and Python is not type safe? These would be reasons in my book.QuotePURE implementation id est CODING is not a quant job for me, it's an IT one. Interesting viewpoint. How do you fine tune / debug your models? QuoteSTART: -creating the model (so that's the math part) (quant)-developping the algos to solve it and to calibrate it (that's the numeric part) (half quant/half IT)-coding it (that's the boring part, at least to me ) (pure IT)then you will have the backtesting and so onif not OK GOTO STARTThis is a loop, in general. BTW I think you cannot filter out what you call 'IT" from the core algorithmic process. It's so artificial to do that. Furthermore, there are several IT activities such as application development, acceptance testing, system integration etc. The more people in your loop, the more overhead and less s/w reliability.
Last edited by Cuchulainn on February 10th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
TinMan
Posts: 21
Joined: September 21st, 2006, 9:42 am

Implementing a model

February 11th, 2012, 12:47 pm

QuoteOriginally posted by: frenchX (1) In fact it would depends. You have several steps in model implementation-creating the model (so that's the math part) (quant)-developping the algos to solve it and to calibrate it (that's the numeric part) (half quant/half IT)-coding it (that's the boring part, at least to me ) (pure IT)then you will have the backtesting and so onPURE implementation id est CODING is not a quant job for me, it's an IT one. There is nothing relating to "quantitative" if you are given the model and the algos and all your work is typing it.Nonsense, you can't draw clear distinctions like that. The idea that a 'quant' can develop something and hand it over to the coding guy to 'type' it like a secretary typing a dictated letter is stupid.How does someone effectively code if they don't understand what the code is supposed to be doing?How does someone effectively 'develop' an algorithm if they don't understand how it's going to be coded?Who debugs the code if it doesn't work?These clear distinctions only exist on the internet.
 
User avatar
tags
Posts: 3631
Joined: February 21st, 2010, 12:58 pm

Implementing a model

February 11th, 2012, 2:15 pm

Quote(3) For me the most important in a code is readibility (I don't want to spend 10 hr in understanding what a guy wrote), extendibility (the possibility to modify and improve it quickly) and integrability (the possibility to incorporate it in a bigger environment). Obviously your code has to be reliable and quick. Usually you have no freedom about the language to use, the method of programmation to use and since you are working in an environment with a lot of objects, sturctures, templates and libraries in fact you have very little freedom for innovative revolutionnary programming. The model has to be implemented for production in a efficient and robust manner. You don't have to reinvent the wheel.one can have a look at 1.5 What is software quality in Introduction to C++ for Financial Engineers: An Object-Oriented Approach, that is a reading recommended by many.
Last edited by tags on February 10th, 2012, 11:00 pm, edited 1 time in total.
 
User avatar
daveangel
Posts: 5
Joined: October 20th, 2003, 4:05 pm

Implementing a model

February 11th, 2012, 2:28 pm

QuoteThese clear distinctions only exist on the internet.and in frenchx's head
knowledge comes, wisdom lingers
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

Implementing a model

February 11th, 2012, 4:03 pm

In all fairness, I think Original Post should not be on Technical , it is more a Student question??
Last edited by Cuchulainn on February 10th, 2012, 11:00 pm, edited 1 time in total.