I see your point, yes, it shouldn't be over-complicated.BTW, for something completely different (but perhaps simpler for the users & more MATLAB-idiomatic): what do you think about context-dependent named arguments:
http://www.mathworks.se/help/techdoc/re ... arser.html ?Perhaps something like bgm_barrier_option(S0, yield, vol, Barrier, Strike, T, 'option_type', 'down-and-in-call', 'function', 'price') ?// BTW' -- I'm inclined against using abbreviations or acronyms, unless they're extremely very well-known, like LMM for Libor Market Model. In the short-term it makes it convenient for us, but in the long-term it might be less convenient for the users; I also thing it might break discoverability,
http://accu.org/index.php/journals/1572If we can keep parse it in a context-dependent way, the user wouldn't have to repeat himself -- so, if the parser "knows" that the argument passed to bgm_barrier_option function next to the 'option_type' to is going to be something that maps to qfcl.barrier_option.option_types, then there shouldn't be a need for the user to repeat himself and say that twice (and since bgm_barrier_option is already a part of the QFCL package, thus no need to repeat it either)?No idea on the simplicity/efficiency tradeoff characteristics of that (parsing is probably not costless), but perhaps that shouldn't be our focus in MATLAB environment...