SERVING THE QUANTITATIVE FINANCE COMMUNITY

  • 1
  • 2
  • 3
  • 4
  • 5
  • 16
 
User avatar
fancidev
Posts: 6
Joined: October 10th, 2011, 10:15 pm

Architecture and Design

October 11th, 2011, 10:04 pm

Nice one! A few of my thoughts:- in math:rocesses, these classes likely will have some sort of interaction with random number generation, monte-carlo simulation, etc. Would be nice if they can be decoupled clearly or maybe move math:rocesses to some higher level of the library.- fin::instruments, are they supposed to be generic instruments (option with expiry T and strike K) or specific contracts (fx option with a specific expiry date, settlement date, time-cut, currency pair, etc)?- similar question applies to the black_and_scholes model. In general, are we going to deal with it generic (double T, T=1.0 means one year) or specific (particular date)? Well for constant vol BS this probably doesn't differ much but assume we have a time-dependent deterministic vol BS...- probably add "calendar", "day count calculator/schedule generator" to fin namespace?- can add "sabr" to special_models ?
 
User avatar
Alan
Posts: 10357
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Architecture and Design

October 13th, 2011, 1:36 pm

Re calendars and date/time support. I was re-reading the VIX white paper yesterday. They measure time-to-expiration in minutes andsuggest that most professional traders do so also. Suggest at least this granularity be available to all derivative evaluators. If youwanted to replicate the VIX index, for instance, you would need it.
 
User avatar
Cuchulainn
Topic Author
Posts: 63177
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Architecture and Design

October 22nd, 2011, 2:34 pm

One important aspect of MC and FDM frameworks is that we must be able to customise algorithms. In GOF I use Strategy, Template Method, Command and Visitor. Very good (V1). This is already working in both cases.Now, I also want a generic version (V2) as well. I use Boost function and signals which are excellent. And BGL Visitor to define event points in an algorithm (default visitors have empty body and you use inheritance.)I would then have a BGL Visitor for each kind of option (barrier, asian, early) and output (e.g. MC statistics gathering). Super flexible and easy to do in C# (delegates) as well.Q1. Is this a good approach in V2?2. Is BGL Visitor approach used a lot (for me, it is aka Template Method pattern?edit: The analogy Boost Visitor and GOF Template Method is the most accurate one imo.
Last edited by Cuchulainn on October 21st, 2011, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
Cuchulainn
Topic Author
Posts: 63177
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Architecture and Design

October 23rd, 2011, 9:12 am

Quote* your post is about having a flexible engine, which gets configured (runtime/compiletime), and then need to numbercrunch with high efficiency...It's about the archictecture and design drawings and interfaces that wil be mapped to C++, C# , Matlab etc. This process is well-known and documented. A well-designed system leads to an efficient (and maintainable!) one.Quote* a nice set of information containers and manipulation bits that setup the engine.Maybe, this look like detailed design, which is the easy part. I want to avoid premature optimisation. QuoteCan we work on a case? Eg the price of digital barrier option? With implicit, explicit Euler and with MC?That would allow use to define elements, and put things at the correct place? This is possible (and has been done, see bespoke chapter 0 MC!) but I don't need code examples in order to discover requirements as I have a number of frameworks at design level which I want to 'stress-test' by inspecting the UML class and component diagrams. Simultaneously, I have a number of Proof-Of-Concept (POC) programs to test the design.QuoteEg, a digital barrier contract has:* barrier* expiration date...we can use doubles for both for now.It has a payoff of $1 at expiration if max(St) 0<t<=T is at least B We could decide to sample the max(St) distribution, or we can make various path samples with discrete time steps, and approximate the distribution.There is also a process, eg gbm or Heston, that's another element... That's no problem and low-risk; more pressing is finding the components and their interfaces. See again Chap 0 POC.Question:Do quants 'see' a system as multiple lines of code or have they some _back_of_envelope_ design model??
Last edited by Cuchulainn on October 22nd, 2011, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
Cuchulainn
Topic Author
Posts: 63177
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Architecture and Design

October 23rd, 2011, 9:47 am

QuoteOriginally posted by: outrunThen I would like to see the design in action with a code example. I need to see potential holes by trying to come up with things that wont fit, or generate inefficient code. Do you have access to the sandbox?I hear what you are saying.Of course. I am not ready yet. First, my design documents. Can you find potential holes without having access to code (Btw, it has and can be done).My question again is reading design documents! It's crucial.
Last edited by Cuchulainn on October 22nd, 2011, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
 
User avatar
Cuchulainn
Topic Author
Posts: 63177
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Architecture and Design

October 23rd, 2011, 10:03 am

The component diagrams will look like this:
Last edited by Cuchulainn on October 22nd, 2011, 10:00 pm, edited 1 time in total.
Step over the gap, not into it. Watch the space between platform and train.
http://www.datasimfinancial.com
http://www.datasim.nl
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On