<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Quantitative Finance Collector]]></title> 
<link>http://www.mathfinance.cn/index.php</link> 
<description><![CDATA[Quantitative Finance Collector is a blog on Quantitative finance analysis, financial engineering methods in mathematical finance focusing on derivative pricing, quantitative trading and quantitative risk management.]]></description> 
<language>en-US</language> 
<copyright><![CDATA[Quantitative Finance Collector]]></copyright>
<item>
<link>http://www.mathfinance.cn/fast-and-accurate-long-stepping-simulation-Heston-stochastic-volatility-model/</link>
<title><![CDATA[Fast and Accurate Long Stepping Simulation of the Heston Stochastic Volatility Model]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Wed, 20 Oct 2010 12:57:43 +0000</pubDate> 
<guid>http://www.mathfinance.cn/fast-and-accurate-long-stepping-simulation-Heston-stochastic-volatility-model/</guid> 
<description>
<![CDATA[<strong>Heston stochastic volatility</strong> model is widely used in both industry and academia, due to the correlation between stock process and volatility process, plus a non-negative square root volatility, <a href="http://www.mathfinance.cn/heston-stochastic-volatility-simulation/" target="_blank">simulation of Heston volatility</a> doesn't sound easy & stable. Professor Mark Joshi has a recent working paper <em>Fast and Accurate Long Stepping Simulation of the Heston Stochastic Volatility Model</em>, as its title suggests: this paper aims to provide a better simulation scheme.<br/><br/><div class="quote"><div class="quote-title">Quotation</div><div class="quote-content">In this paper, we present three new discretization schemes for the Heston stochastic volatility model - two schemes for simulating the variance process and one scheme for simulating the integrated variance process conditional on the initial and the end-point of the variance process. Instead of using a short time-stepping approach to simulate the variance process and its integral, these new schemes evolve the Heston process accurately over long steps without the need to sample the intervening values. Hence, prices of financial derivatives can be evaluated rapidly using our new approaches. </div></div>&nbsp;&nbsp;<br/><br/><img src="http://www.mathfinance.cn/attachment/1287320029_62412417.png" width=531 height=329 alt="heston stochastic volatility monte carlo simulation"></img><br/>looks brilliant indeed, interested readers shall download the C++ code and paper directly at <a href="http://www.markjoshi.com/downloads/index.htm" target="_blank" rel="nofollow">http://www.markjoshi.com/downloads/index.htm</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/heston/" rel="tag">heston</a> , <a href="http://www.mathfinance.cn/tags/simulation/" rel="tag">simulation</a> , <a href="http://www.mathfinance.cn/tags/volatility/" rel="tag">volatility</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/fast-and-accurate-long-stepping-simulation-Heston-stochastic-volatility-model/">Fast and Accurate Long Stepping Simulation of the Heston Stochastic Volatility Model</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/combined-regression-and-ranking/</link>
<title><![CDATA[Combined Regression and Ranking]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 17 Sep 2010 13:20:40 +0000</pubDate> 
<guid>http://www.mathfinance.cn/combined-regression-and-ranking/</guid> 
<description>
<![CDATA[<a href="http://quantivity.wordpress.com/2010/09/06/combining-regression-and-ranking/" target="_blank" rel="nofollow">Quantivity</a> introduced an interesting article a few days ago <strong>Combined Regression and Ranking</strong> that may be interesting to some of you.<br/><br/>The basic idea of <strong>Combined Regression and Ranking</strong> is to optimize regression and ranking objectives simultaneously. Generally we are trying to keep the predicted values as close as possible to the true target value for regression based method, such as minimizing the mean square error (MSE), however, besides accurately producing values, in some circumstances we are more interested in a model able to predict the ranking as well. A good example in the paper is: considering nearly all observations have target value y=0 and only a small fraction have value y=1, therefore a model predicting 0 for all cases is good enough using regression, however, it failes to return a useful & meaningful ranking.<br/><br/>The objective funtion for <strong>combined regression and ranking</strong> is given by<br/><img src="http://www.mathfinance.cn/attachment/1284296690_12201280.png" alt="objective function" width=351 height=39></img><br/>where the first part is for regression loss, the second part is for pairwise ranking loss, and the parameter alpha intuitively trades off between optimizing regression loss and optimizing pairwise loss.<br/><br/>Some possible financial applications of <strong>combined regression and ranking</strong> I am aware:<br/><strong>1</strong>, long-tailed distribution fitting. since a large fraction is composed of very low frequency event, hence we want to come up with a model that fits not only the extreme values but also the ranking of them;<br/><br/><strong>2</strong>, multiple-factor analysis, where we need to pick the stocks by their past return performance as well as their relative ranking among peers;<br/><br/><strong>3</strong>, traders performance analysis, same reason as in 2.<br/><br/><strong>4</strong>, company credit ratings, where we may be interested in not only how to predict future ratings, AA or A using infor such as historical default probability, but the relative positions of different companies in investment assets pool.<br/><br/>... <br/><br/>Download the paper at <a href="http://www.eecs.tufts.edu/~dsculley/papers/combined-ranking-and-regression.pdf" target="_blank" rel="nofollow">http://www.eecs.tufts.edu/~dsculley/papers/combined-ranking-and-regression.pdf</a> and free C++ at <a href="http://code.google.com/p/sofia-ml" target="_blank" rel="nofollow">http://code.google.com/p/sofia-ml</a>.<br/>Tags - <a href="http://www.mathfinance.cn/tags/regression/" rel="tag">regression</a> , <a href="http://www.mathfinance.cn/tags/ranking/" rel="tag">ranking</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/combined-regression-and-ranking/">Combined Regression and Ranking</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/barrier-option-pricing-using-adjusted-transition-probabilities/</link>
<title><![CDATA[Barrier Option Pricing Using Adjusted Transition Probabilities]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Mon, 05 Apr 2010 21:08:51 +0000</pubDate> 
<guid>http://www.mathfinance.cn/barrier-option-pricing-using-adjusted-transition-probabilities/</guid> 
<description>
<![CDATA[One big issue of pricing barrier option with <a href="http://www.mathfinance.cn/nine-ways-implement-binomial-tree-option-pricing/" target="_blank">Binomial tree</a> or other lattice method is its slow convergence rate, the barrier option value converges very slowly as the number of tree or lattice levels increase, often requiring unattainably large computing times for even a modest accuracy. A typical plot of barrier option binomial tree results against its analytic value looks like<br/><a href="http://www.mathfinance.cn/attachment.php?fid=79" target="_blank"><img src="http://www.mathfinance.cn/attachment.php?fid=79" class="insertimage" alt="Open in new window" title="Open in new window" border="0" width="500"/></a><br/><em>source from paper Enhanced Numerical Methods for Options with Barriers</em><br/>where the pricing performance is in a sawtooth fashion, with severe periodic spikes that move away from the correct result, which is a nightmare for a researcher because adding more steps doesn't necessarily mean to yield a more accurate answer. <br/>The reason for this is that the barrier being used by the tree is generally different from the true barrier value, for example, as demonstrated below, no matter inner barrier or outer barrier is chosen in practice, calculated value will always be smaller or bigger than correct value, where true barrier shall be used.<br/><a href="http://www.mathfinance.cn/attachment.php?fid=80" target="_blank"><img src="http://www.mathfinance.cn/attachment.php?fid=80" class="insertimage" alt="Open in new window" title="Open in new window" border="0"/></a><br/><br/>John Hull presents three approaches for overcoming this problem, namely, positioning nodes on the barriers, adjusting for nodes not lying on barriers, and the adaptive mesh model. Interested readers please refer to chapter 20, from page 467 to 472, the 5th version, Options, futures and other derivatives. Or read another paper in detail "Enhanced Numerical Methods for Options with Barriers" by Emanuel Derman, etc downloadable at <a href="http://www.ederman.com/new/docs/gs-numerical_methods.pdf" target="_blank" rel="nofollow">http://www.ederman.com/new/docs/gs-numerical_methods.pdf</a>.<br/><br/>The way shared today is distinct from the three approaches, unlike traditional methods to ensure convergence through placing the barrier in close proximity to, or directly onto, the nodes of the tree lattice, this method applies a suitable transition probability adjustment, thereafter called <strong>Barrier Option Pricing Using Adjusted Transition Probabilities</strong>, which exhibits increased convergence to the analytical option price, <br/><a href="http://www.mathfinance.cn/attachment.php?fid=81" target="_blank"><img src="http://www.mathfinance.cn/attachment.php?fid=81" class="insertimage" alt="Open in new window" title="Open in new window" border="0" width="500"/></a><br/><em>source from paper Barrier Option Pricing Using Adjusted Transition Probabilities</em><br/><br/>Please read the paper for detail at <a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=964623" target="_blank" rel="nofollow">http://papers.ssrn.com/sol3/papers.cfm?abstract_id=964623</a> and check the accompanying C++ codes at <a href="http://www.codeproject.com/KB/recipes/Zeppelin_Barrier_Options1.aspx" target="_blank" rel="nofollow">http://www.codeproject.com/KB/recipes/Zeppelin_Barrier_Options1.aspx</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/barrier/" rel="tag">barrier</a> , <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a> , <a href="http://www.mathfinance.cn/tags/binomial/" rel="tag">binomial</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/barrier-option-pricing-using-adjusted-transition-probabilities/">Barrier Option Pricing Using Adjusted Transition Probabilities</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/meta-financial-function-library/</link>
<title><![CDATA[Meta Financial Functions Library]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 19 Jan 2010 11:00:56 +0000</pubDate> 
<guid>http://www.mathfinance.cn/meta-financial-function-library/</guid> 
<description>
<![CDATA[<strong>Meta Financial Functions Library</strong> is a free library for option pricing written in C++, as of now, Meta Systems offers no commercial products, and the library is still under beta, as indicated by its author: "The Meta Financial Formula Library implements many commonly used functions as correctly as possible once and then provides wrapper functions and code to be able to reuse the implemenation from other tools and languages."<br/><br/>At the moment <strong>Meta Financial Functions Library</strong> covers a wide range of vanilla and exotic options, which can be obviously seen from the name of functions, for example, a list of functions includes black76, black76_put, black76_call, blackscholes, gbs, gcarry, AmericanExchangeOption, AssetOrNothing, BAWAmericanApprox, BSAmericanApprox, BinaryBarrier, CashOrNothing, ComplexChooser, DiscreteAdjustedBarrier, DoubleBarrier, EquityLinkedFXO, EuropeanExchangeOption, ExchangeExchangeOption, Executive, ExtendibleWriter, ExtremeSpreadOption, FixedStrikeLookback, FloatingStrikeLookback, ForEquOptInDomCur, ForwardStartOption, GapOption, GeometricAverageRateOption, JumpDiffusion, LevyAsian, LookBarrier, OptionsOnOptions, OptionsOnTheMaxMin, PartialFixedLB, PartialFloatLB, PartialTimeBarrier, PartialTimeTwoAssetBarrier, Quanto, RollGeskeWhaley, SimpleChooser, SoftBarrier, SpreadApproximation, StandardBarrier, SuperShare, SuperShare_inlined, Swapoption, TakeoverFXoption, TimeSwitchOption, TurnbullWakemanAsian, TwoAssetBarrier, TwoAssetCashOrNothing, TwoAssetCorrelation, VasicekBondPrice, VasicekBondOption...<br/><br/>, what a long list! you shall download the library at <a href="http://www.metasystems.no/" target="_blank" rel="nofollow">http://www.metasystems.no/</a>, which is free and the author makes the source code clean and publicly available, learning from others is always enjoying.<br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/library/" rel="tag">library</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/meta-financial-function-library/">Meta Financial Functions Library</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/finite-element-differential-equation-analysis-library/</link>
<title><![CDATA[A Finite Element Differential Equations Analysis Library]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 15 Jan 2010 14:22:24 +0000</pubDate> 
<guid>http://www.mathfinance.cn/finite-element-differential-equation-analysis-library/</guid> 
<description>
<![CDATA[Attended a training of <a href="http://www.nag.co.uk/numeric/MB/start.asp" target="_blank" rel="nofollow">NAG Toolbox for MATLAB</a> today (NAG is short for Numerical Algorithms Group), nice presentation and persuasive performance against Matlab toolbox. I will soon get a licence and start to experience myself.<br/><br/>Anyway, I got to know two sites after the training, first one is <a href="http://www.dealii.org/" target="_blank" rel="nofollow">deal.II</a>, which is a <a href="http://www.mathfinance.cn/finite-element-pde/" target="_blank">finite element</a> differential equations analysis library aiming to enable rapid development of modern <strong>finite element</strong> codes, using among other aspects adaptive meshes and a wide array of tools classes often used in <strong>finite element</strong> program. As stated on its webpage: "deal.II is a C++ program library targeted at the computational solution of partial differential equations using <strong>adaptive finite elements</strong>. It uses state-of-the-art programming techniques to offer you a modern interface to the complex data structures and algorithms required." It should be very useful for those people playing often with PDE numerical solution.<br/><br/>The other site is <a href="http://www.walkingrandomly.com/" target="_blank" rel="nofollow">Walking randomly</a>, a blog where the author randomly collects things including mathematics, physics, vintage computing, Linux, pocket PCs, Android, music and programming. I am especially interested in its Matlab, R, NAG, and statistics categories.<br/><br/>Have a nice weekend.<br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/nag/" rel="tag">nag</a> , <a href="http://www.mathfinance.cn/tags/finite-element/" rel="tag">finite-element</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/finite-element-differential-equation-analysis-library/">A Finite Element Differential Equations Analysis Library</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Cplusplus-for-numerical-computation/</link>
<title><![CDATA[C/C++ for Numerical Computation]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 08 Dec 2009 14:38:33 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Cplusplus-for-numerical-computation/</guid> 
<description>
<![CDATA[A large list of <strong>C/C++ Sources for Numerical Computation</strong>, as its' website introduces:<br/>This is a collection of pointers to:<br/><br/>* free source code available on the net,<br/>* books which come with source code, and hence act as low-cost libraries,<br/>* articles and documents, especially those available over the net. <br/><br/>Check it out if you happen to find it useful: <a href="http://cliodhna.cop.uop.edu/~hetrick/c-sources.html" target="_blank" rel="nofollow">http://cliodhna.cop.uop.edu/~hetrick/c-sources.html</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/numerical/" rel="tag">numerical</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Cplusplus-for-numerical-computation/">C/C++ for Numerical Computation</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/sobol-sequence/</link>
<title><![CDATA[Sobol sequence generator]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 11 Jun 2009 20:02:37 +0000</pubDate> 
<guid>http://www.mathfinance.cn/sobol-sequence/</guid> 
<description>
<![CDATA[<strong>Sobol sequence</strong> has been shared at posts <a href="http://www.mathfinance.cn/Sobol_Faure_sequences/" target="_blank">Sobol and Generalised Faure sequences</a>, <a href="http://www.mathfinance.cn/halton-sobol-sequences/" target="_blank">halton and sobol sequences</a>, and <a href="http://www.mathfinance.cn/primitive-polynomials-sobol-sequences/" target="_blank">Primitive polynomials for Sobol sequences</a>, respectively. Please read Low-discrepancy sequence at <a href="http://en.wikipedia.org/wiki/Sobol_sequence" target="_blank" rel="nofollow">Wikipedia </a>for introduction.<br/><br/>Here is another <strong>Sobol sequence generator</strong> containing the primitive polynomials and various sets of initial direction numbers for generating <strong>Sobol sequences</strong>. The reason I open a new post for it is it is able to support up to dimension 15000, incredible. Check it out at <a href="http://web.maths.unsw.edu.au/~fkuo/sobol/index.html" target="_blank" rel="nofollow">http://web.maths.unsw.edu.au/~fkuo/sobol/index.html</a>.<br/>Tags - <a href="http://www.mathfinance.cn/tags/sobol/" rel="tag">sobol</a> , <a href="http://www.mathfinance.cn/tags/monte_carlo/" rel="tag">monte carlo</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/sobol-sequence/">Sobol sequence generator</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/ATOM-C-option-calculator/</link>
<title><![CDATA[ATOM C++ option calculator ]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 05 May 2009 16:01:30 +0000</pubDate> 
<guid>http://www.mathfinance.cn/ATOM-C-option-calculator/</guid> 
<description>
<![CDATA[Another <a href="http://www.mathfinance.cn/online-derivative-calculator/" target="_blank">derivative calculator</a> shared with you, ATOM - Advanced Tool for Option Modelling is a <strong>C++ option calculator </strong>covers:<br/><br/>price,<a href="http://www.mathfinance.cn/black_scholes_implied_volatility/" target="_blank"> implied volatility </a>and <a href="http://www.mathfinance.cn/option-greeks/" target="_blank">Greek letters</a>; <br/><a href="http://www.mathfinance.cn/black_scholes_language/" target="_blank">Black-Scholes analytic formula</a>; <br/><a href="http://www.mathfinance.cn/tags/tree/1/" target="_blank">binomial tree lattice</a>; <br/>Cox-Ross-Rubinstein parametrisation; <br/>Jarrow-Rudd equal-probabilitiy parametrisation; <br/><a href="http://www.mathfinance.cn/asian-option-monte-carlo/" target="_blank">control variable technique</a>; <br/>Broadie-Detemple penultimate node analytic approximation; <br/><a href="http://www.mathfinance.cn/antithetic-sampling/" target="_blank">Monte carlo simulation with the following variance reduction </a>and normal sampling techniques: <br/>antithetic variable; <br/>moment matching, also known as quadratic re-sampling; <br/><a href="http://www.mathfinance.cn/Mersenne_Twister/" target="_blank">Mersenne Twister pseudo-random numbers</a>; <br/><a href="http://www.mathfinance.cn/halton-sobol-sequences/" target="_blank">Halton quasi-random numbers</a>; <br/>Box-Muller polar normal inversion; <br/><a href="http://www.mathfinance.cn/Moro_inverse_normal/" target="_blank">Moro normal inversion</a>; <br/>unlimited maximum number of steps in binomial trees and unlimited maximum number of trials and time intervals in Monte carlo simulations; <br/>exotic option support: <a href="http://www.mathfinance.cn/Asian_Option_Pricing/" target="_blank">Asian average price</a>, <a href="http://www.mathfinance.cn/binary-option-calculator-on-gphone/" target="_blank">binary cash-or-nothing and asset-or-nothing</a>, <a href="http://www.mathfinance.cn/Monte_Carlo_Chooser_Option/" target="_blank">chooser option</a>; <br/><br/>Download at <a href="http://www.atomproject.org/download.shtml" target="_blank" rel="nofollow">http://www.atomproject.org/download.shtml</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/calculator/" rel="tag">calculator</a> , <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/ATOM-C-option-calculator/">ATOM C++ option calculator </a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/LAPACK-High-Performance-Linear-Algebra/</link>
<title><![CDATA[LAPACK++: High Performance Linear Algebra]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Sun, 26 Apr 2009 23:28:17 +0000</pubDate> 
<guid>http://www.mathfinance.cn/LAPACK-High-Performance-Linear-Algebra/</guid> 
<description>
<![CDATA[<strong>LAPACK++</strong>: A Design Overview of Object-Oriented Extensions for High Performance Linear Algebra. <strong>LAPACK++ (Linear Algebra PACKage in C++)</strong> is a software library for numerical linear algebra that solves systems of linear equations and eigenvalue problems on high performance computer architectures.<br/><br/>Computational support is provided for supports various matrix classes for vectors, non-symmetric matrices, SPD matrices, symmetric matrices, banded, triangular, and tridiagonal matrices; however, it does not include all of the capabilities of original f77 LAPACK. Emphasis is given to routines for solving linear systems consisting of non-symmetric matrices, symmetric positive definite systems, and solving <a href="http://www.mathfinance.cn/Levenberg-Marquardt-nonlinear-least-squares/" target="_blank">linear least-square</a> systems. <br/><br/>Download at <a href="http://math.nist.gov/lapack++/" target="_blank" rel="nofollow">http://math.nist.gov/lapack++/</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/algebra/" rel="tag">algebra</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/LAPACK-High-Performance-Linear-Algebra/">LAPACK++: High Performance Linear Algebra</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Kernel-principal-component-analysis/</link>
<title><![CDATA[Kernel principal component analysis]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 26 Mar 2009 15:54:40 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Kernel-principal-component-analysis/</guid> 
<description>
<![CDATA[EasyPCA is a small educational program intended to help to understand how the <a href="http://www.mathfinance.cn/principal-component-analysis/" target="_blank">Principal Component Analysis</a> (PCA) algorithm works. It has been coded in a very modular way in order to make it easy to understand the code.<br/><br/>PCA is a useful statistical technique that has found application in fields such as face recognition and image compression, and is a common technique for finding patterns in data of high dimension.<br/><br/>For more detail please check <a href="http://transp-or2.epfl.ch/pagesPerso/javierFiles/software.php" target="_blank" rel="nofollow">http://transp-or2.epfl.ch/pagesPerso/javierFiles/software.php</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/pca/" rel="tag">pca</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Kernel-principal-component-analysis/">Kernel principal component analysis</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/c-class-financial-source-code/</link>
<title><![CDATA[c++ for finance]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Wed, 11 Mar 2009 18:03:34 +0000</pubDate> 
<guid>http://www.mathfinance.cn/c-class-financial-source-code/</guid> 
<description>
<![CDATA[A <strong>c++ class list for finance</strong>, specifically, a <a href="http://www.mathfinance.cn/online-derivative-calculator/" target="_blank"> derivative calculator</a> source code, is available, including:<br/><br/><a href="http://www.mathfinance.cn/Crank-Nicholson-american-option/" target="_blank">american_option_approximation</a>: uses the Black Scholes formulae for European options, to approximate the values of American options.<br/> <br/>american_option_fudge: approximates the value of American Options as the value of the corresponding European option, plus the addition of a fudge factor<br/><br/><a href="http://www.mathfinance.cn/avoid-oscillation-Binomial-tree/" target="_blank">binomial_option</a>: typical binomial tree to price option value<br/><br/>Bisection_Secant< functor, real > : This class is a child class of Bisection. The algorithm converges faster because it changes from the bisection to the secant algorithm /// on every other iteration&nbsp;&nbsp;<br/><br/>european_option_pair : <a href="http://www.mathfinance.cn/black_scholes_pricing/" target="_blank">Black Scholes option pricing formulae </a>for puts and calls&nbsp;&nbsp;<br/><br/>...<br/><br/>Click for more and downloading <a href="http://acumenconsultinginc.net/TechNotes/public_options/html/annotated.html" target="_blank" rel="nofollow">http://acumenconsultinginc.net/TechNotes/public_options/html/annotated.html</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a> , <a href="http://www.mathfinance.cn/tags/c%252B%252B/" rel="tag">c++</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/c-class-financial-source-code/">c++ for finance</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Matlab-cointegration/</link>
<title><![CDATA[Matlab implementation of cointegration tests]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Mon, 16 Feb 2009 18:26:28 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Matlab-cointegration/</guid> 
<description>
<![CDATA[Matlab of the paper "Implementing Pesaran-Shin-Smith"<br/><br/>This first year paper is based on Pesaran et al. (2000) who generalise the cointegration tests<br/>introduced by Johansen to include exogenous I(1) variables in a VECM model. It reiterates<br/>the proofs for their central test statistics and presents them in a less dense format: Following<br/>Pesaran et al. (2000), this paper focuses on the derivation of the corresponding cointegrating rank<br/>tests, by first introducing a VAR model, subsequently deriving the likelihood for the cointegration<br/>parameters and, finally, the test statistics and their asymptotic distributions. The final section<br/>introduces tests on whether the required exogeneity restrictions hold. In addition, this paper is<br/>concerned with implementing the mentioned test statistics in a Matlab routine.<br/><br/>Paper and Matlab code: <a href="http://www.zeugner.eu/arbeiten/tafel.php" target="_blank" rel="nofollow">http://www.zeugner.eu/arbeiten/tafel.php</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/cointegration/" rel="tag">cointegration</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Matlab-cointegration/">Matlab implementation of cointegration tests</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Newmat-C-matrix-library/</link>
<title><![CDATA[Newmat C++ matrix library ]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 18 Dec 2008 21:16:14 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Newmat-C-matrix-library/</guid> 
<description>
<![CDATA[This C++ library is intended for scientists and engineers who need to manipulate a variety of types of matrices using standard <a href="http://www.mathfinance.cn/tags/matrix/" target="_blank">matrix operations</a>. Emphasis is on the kind of operations needed in <a href="http://www.mathfinance.cn/tags/statistics/" target="_blank">statistical calculations</a> such as least squares, linear equation solve and eigenvalues.<br/><br/>It supports matrix types: Matrix (rectangular matrix); UpperTriangularMatrix; LowerTriangularMatrix; DiagonalMatrix; SymmetricMatrix; BandMatrix; UpperBandMatrix; LowerBandMatrix; SymmetricBandMatrix; IdentityMatrix; RowVector; ColumnVector.<br/><br/>Only one element type (float or double) is supported.<br/><br/>The library includes the operations *, +, -, *=, +=, -=, Kronecker product, Schur product, concatenation, inverse, transpose, conversion between types, submatrix, determinant, <a href="http://www.mathfinance.cn/tags/cholesky/" target="_blank">Cholesky decomposition</a>, QR triangularisation, singular value decomposition, eigenvalues of a symmetric matrix, sorting, fast Fourier and trig. transforms, printing and an interface with Numerical Recipes in C. <br/><br/>Introduction and package downloading: <a href="http://www.robertnz.net/nm_intro.htm" target="_blank" rel="nofollow">http://www.robertnz.net/nm_intro.htm</a><br/><a href="http://www.robertnz.net/download.html" target="_blank" rel="nofollow">http://www.robertnz.net/download.html</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/matrix/" rel="tag">matrix</a> , <a href="http://www.mathfinance.cn/tags/library/" rel="tag">library</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Newmat-C-matrix-library/">Newmat C++ matrix library </a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/feedforward-neural-networks-estimation/</link>
<title><![CDATA[Feedforward Neural Networks and Lyapunov Exponents Estimation ]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 20 Nov 2008 20:35:44 +0000</pubDate> 
<guid>http://www.mathfinance.cn/feedforward-neural-networks-estimation/</guid> 
<description>
<![CDATA[This program, NETLE.EXE, estimates feedforward neural network models and computes Lyapunov exponents (LE).&nbsp;&nbsp;Neural networks are estimated by the method of nonlinear least squares (NLS) (Kuan and Liu (1995)); Lyapunov exponents are calculated from the derivative matrices of estimated network models (Gencay and Dechert (1992)).&nbsp;&nbsp;Note that a positive Lyapunov exponent indicates that the underlying series is chaotic.<br/><br/>REFERENCES:<br/><br/>Kuan, Chung-Ming and Tung Liu (1995).&nbsp;&nbsp; "Forecasting exchange rates using feedforward and recurrent networks", Journal of Applied Econometrics, forthcoming.<br/><br/>Gencay, Ramazan and W. D. Dechert (1992).&nbsp;&nbsp; "An algorithm for the n Lyapunov exponents of an n-dimensional unknown dynamical system", Physica D, 59, 142-157. <br/><br/><a href="http://www.sfu.ca/~rgencay/lyap.html" target="_blank" rel="nofollow">http://www.sfu.ca/~rgencay/lyap.html</a><br/><br/><br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/neural-network/" rel="tag">neural-network</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/feedforward-neural-networks-estimation/">Feedforward Neural Networks and Lyapunov Exponents Estimation </a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Levenberg-Marquardt-nonlinear-least-squares/</link>
<title><![CDATA[Levenberg-Marquardt nonlinear least squares algorithms]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 04 Nov 2008 21:17:18 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Levenberg-Marquardt-nonlinear-least-squares/</guid> 
<description>
<![CDATA[In mathematics and computing, the Levenberg–Marquardt algorithm (or LMA) provides a numerical solution to the problem of <a href="http://www.mathfinance.cn/tags/optimization/" target="_blank">minimizing a function</a>, generally nonlinear, over a space of parameters of the function. These minimization problems arise especially in least squares curve fitting and nonlinear programming.<br/><br/>The Levenberg-Marquardt algorithm has proved to be an effective and popular way to solve nonlinear least squares problems. MINPACK-1 contains Levenberg-Marquardt codes in which the Jacobian matrix may be either supplied by the user or calculated by using finite differences. IMSL , MATLAB , ODRPACK , and PROC NLP also contain Levenberg-Marquardt routines.<br/><br/>The algorithms in ODRPACK solve unconstrained nonlinear least squares problems and orthogonal distance regression problems, including those with implicit models and multiresponse data.<br/><br/>For detail about Levenberg-Marquardt nonlinear least squares algorithms introduction and code pls click <a href="http://www.ics.forth.gr/~lourakis/levmar/" target="_blank" rel="nofollow">http://www.ics.forth.gr/~lourakis/levmar/</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/levenberg-marquardt/" rel="tag">levenberg-marquardt</a> , <a href="http://www.mathfinance.cn/tags/optimization/" rel="tag">optimization</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Levenberg-Marquardt-nonlinear-least-squares/">Levenberg-Marquardt nonlinear least squares algorithms</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/singular-value-decomposition/</link>
<title><![CDATA[Singular Value Decomposition]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 21 Oct 2008 20:53:13 +0000</pubDate> 
<guid>http://www.mathfinance.cn/singular-value-decomposition/</guid> 
<description>
<![CDATA[In linear algebra, the singular value decomposition (SVD) is an important factorization of a rectangular real or complex matrix, with several applications in signal processing and statistics. Applications which employ the SVD include computing the pseudoinverse, least squares fitting of data, matrix approximation, and determining the rank, range and null space of a matrix.<br/><br/>Singular Value Decomposition to solve ill conditioned square matrices.&nbsp;&nbsp;<br/><br/>Excel, C++ Add-in and Demo Spreadsheet with application manual and on-line help are at <a href="http://www.financial-risk-manager.com/risks/analytics/multivar/an_mv_t.html#svd" target="_blank" rel="nofollow">http://www.financial-risk-manager.com/risks/analytics/multivar/an_mv_t.html#svd</a><br/><br/>wiki(Singular value decomposition)<br/>Tags - <a href="http://www.mathfinance.cn/tags/svd/" rel="tag">svd</a> , <a href="http://www.mathfinance.cn/tags/matrix/" rel="tag">matrix</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/singular-value-decomposition/">Singular Value Decomposition</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/multi-dimensional-numerical-integration/</link>
<title><![CDATA[Multidimensional numerical integration]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 14 Oct 2008 19:59:30 +0000</pubDate> 
<guid>http://www.mathfinance.cn/multi-dimensional-numerical-integration/</guid> 
<description>
<![CDATA[Most derivative pricing problems have finally come to solve integration numerically, by Simpson, Monte Carlo simulation, etc., however, multi-dimensional integration is time-consuming and prone to error, here I share a Cuba library which offers a choice of four independent routines for multidimensional numerical integration: Vegas, Suave, Divonne, and Cuhre. <br/><div class="quote"><div class="quote-title">Quotation</div><div class="quote-content">Vegas is the simplest of the four. It uses importance sampling for <a href="http://www.mathfinance.cn/antithetic-sampling/" target="_blank">variance reduction</a>, but is only in some cases competitive in terms of the number of samples needed to reach a prescribed accuracy. Nevertheless, it has a few improvements over the original algorithm and comes in handy for cross-checking the results of other methods.<br/><br/>Suave is a new algorithm which combines the advantages of two popular methods: importance sampling as done by Vegas and subregion sampling in a manner similar to Miser. By dividing into subregions, Suave manages to a certain extent to get around Vegas' difficulty to adapt its weight function to structures not aligned with the coordinate axes.<br/><br/>Divonne is a further development of the CERNLIB routine D151. Divonne works by stratified sampling, where the partitioning of the integration region is aided by methods from numerical optimization. A number of improvements have been added to this algorithm, the most significant being the possibility to supply knowledge about the integrand. Narrow peaks in particular are difficult to find without sampling very many points, especially in high dimensions. Often the exact or approximate location of such peaks is known from analytic considerations, however, and with such hints the desired accuracy can be reached with far fewer points.<br/><br/>Cuhre employs a cubature rule for subregion estimation in a globally adaptive subdivision scheme. It is hence a deterministic, not a Monte Carlo method. In each iteration, the subregion with the largest error is halved along the axis where the integrand has the largest fourth difference. Cuhre is quite powerful in moderate dimensions, and is usually the only viable method to obtain high precision, say relative accuracies much below 1e-3.</div></div><br/><a href="http://www.feynarts.de/cuba/" target="_blank" rel="nofollow">http://www.feynarts.de/cuba/</a><br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/integration/" rel="tag">integration</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/multi-dimensional-numerical-integration/">Multidimensional numerical integration</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/trinomial-tree-short-rate/</link>
<title><![CDATA[Trinomial tree class for short rate model]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 02 Oct 2008 21:05:55 +0000</pubDate> 
<guid>http://www.mathfinance.cn/trinomial-tree-short-rate/</guid> 
<description>
<![CDATA[This page comprises the code and items of a C++ class that could be applied to construct a trinomial tree for the short rate.&nbsp;&nbsp;The tree matches to the yield curve but not to the volatility. curve.&nbsp;&nbsp;<br/><br/>The programming code is grounded&nbsp;&nbsp;on the book "Implementing Derivatives Models", page 260, Clewlow and Strickland,&nbsp;&nbsp;the code specifies a C++ implementation of a tree object.&nbsp;&nbsp;By input a set of parameters the class will form an array of nodes, each one corresponding to a node on the tree.&nbsp;&nbsp;Currently the tree is matched to the underlying interest rate curve, but not a vol. curve.&nbsp;&nbsp;<br/><br/><a href="http://www.phineas.pwp.blueyonder.co.uk/TreeClass.htm" target="_blank" rel="nofollow">http://www.phineas.pwp.blueyonder.co.uk/TreeClass.htm</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/yield/" rel="tag">yield</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/trinomial-tree-short-rate/">Trinomial tree class for short rate model</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/convertible-bond-calculator/</link>
<title><![CDATA[Numerical valuation of convertible bonds]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 18 Sep 2008 13:16:49 +0000</pubDate> 
<guid>http://www.mathfinance.cn/convertible-bond-calculator/</guid> 
<description>
<![CDATA[A <a href="http://www.mathfinance.cn/Convertible_bond/" target="_blank">Convertible Bond</a> (CB) is a hybrid derivative with complex embedded features, it allows the holder to convert the bond to a certain shares (conversion ratio) of stock issued by the same company at a prescribed stock price (conversion price), besides this feature, CB normally has embedded American call (put) option which allows the bond issuer (holder) to call (sell) back the CB from holder (to issuer) at a pre-decided call (put) price once the underlying stock price is above (below) strike price for a certain prescribed, consecutive time, hereafter called Parisian option; in Asian markets, CB also has a refix clause which allows the bond issuer to reset the conversion price, under several stock price scenarios; as a hybrid product with equity and fixed income characteristics, CB is under default risk, both stochastic interest rate and stochastic volatility play a role for its valuation; etc,.<br/><br/>The <strong>convertible bond calculator</strong> uses a binomial lattice with the stock price as the only state variable to analyse convertible bonds with call and put features. The software does not use the warrant valuation approach which requires the volatility of equity (stocks plus warrants). Instead, it ignores the dilution effect and uses stock price volatility which is more readily available. <br/>download at <a href="http://www.iimahd.ernet.in/~jrvarma/software/ecb.zip" target="_blank" rel="nofollow">http://www.iimahd.ernet.in/~jrvarma/software/ecb.zip</a><br/>online convertible bonds calculator <a href="http://www.iimahd.ernet.in/~jrvarma/software/convertible.php" target="_blank" rel="nofollow">http://www.iimahd.ernet.in/~jrvarma/software/convertible.php</a>, more are at <a href="http://www.iimahd.ernet.in/~jrvarma/software.php" target="_blank" rel="nofollow">http://www.iimahd.ernet.in/~jrvarma/software.php</a>.<br/><br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/convertible_bond/" rel="tag">convertible bond</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/convertible-bond-calculator/">Numerical valuation of convertible bonds</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/low-fat-spread-option/</link>
<title><![CDATA[Spread option valuation]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Wed, 17 Sep 2008 14:49:37 +0000</pubDate> 
<guid>http://www.mathfinance.cn/low-fat-spread-option/</guid> 
<description>
<![CDATA[Spread option derives its value from the difference between the prices of two or more assets, it can be considered as a type of rainbow option in that it's payoff depends on 2 or 3 underlying assets. for instance, for a 2 underlying assets call spread option, the payoff is like max(S1 - S2 - K, 0), where K is the strike price betting on the spread (or difference) of these two stock prices. Spread option is widely used in energy industry, especially in oil industry.<br/><br/>In previous entry how to <a href="http://www.mathfinance.cn/spread_option/" target="_blank">price spread option with Monte Carlo simulation</a> was introduced, here is another valuation method of spread options follwing the article Low-Fat Spreads by K. Ravindran, RISK, Oct 1993.<br/><br/>for detail check <a href="http://www.mathfinance.org/FF/cpplib.php" target="_blank" rel="nofollow">http://www.mathfinance.org/FF/cpplib.php</a>。<br/>Tags - <a href="http://www.mathfinance.cn/tags/spread/" rel="tag">spread</a> , <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/low-fat-spread-option/">Spread option valuation</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/cliquet-option/</link>
<title><![CDATA[Cliquet option with Jump-Diffusion Bates Model]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 16 Sep 2008 21:30:45 +0000</pubDate> 
<guid>http://www.mathfinance.cn/cliquet-option/</guid> 
<description>
<![CDATA[Cliquet option, also called ratchet option,&nbsp;&nbsp;is an extended roll-down option, with strikes set at the barriers, which never knock out completely. It is a series of at the money options, with periodic settlement, resetting the strike value at the then current price level, at which time, the option locks in the difference between the old and new strike and pays that out as the profit. The profit can be accumulated until final maturity, or paid out at each reset date.<br/><br/>The Bates Model is a type of Jump-Difussion model that is able to improve calibration results for short term options. The Bates Model consists of Jumps processes built on top a <a href="http://www.mathfinance.cn/Heston_Stochastic_Volatility/" target="_blank">Heston model</a>. <br/><br/><a href="http://www.javaquant.net/finalgo/BatesModel.html" target="_blank" rel="nofollow">http://www.javaquant.net/finalgo/BatesModel.html</a> lists the C++ code to price Cliquet options using the Log-Jump variant of the Bates model with <a href="http://www.mathfinance.cn/tags/volatility/" target="_blank">stochastic volatility</a>.<br/><br/>wiki(Cliquet option)<br/>Tags - <a href="http://www.mathfinance.cn/tags/cliquet/" rel="tag">cliquet</a> , <a href="http://www.mathfinance.cn/tags/heston/" rel="tag">heston</a> , <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/cliquet-option/">Cliquet option with Jump-Diffusion Bates Model</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/linear-programming-solver/</link>
<title><![CDATA[Mixed Integer Linear Programming (MILP) solver]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Thu, 11 Sep 2008 08:04:28 +0000</pubDate> 
<guid>http://www.mathfinance.cn/linear-programming-solver/</guid> 
<description>
<![CDATA[Are you fed up with "linprog" or "fmincon" command in Matlab? do you sometimes find the results violate your providing constraints while Matlab says "condition satisfied", or sometimes you get a weird solution while Matlab tells you "convergence successful", etc. (I am not saying bad words about Matlab, I AM a fan of it, but if there is a better solution for the given problem, why not at least try it?) <br/><br/>Optimization packages are widelyspread, here is a site i introduced, <a href="http://www.mathfinance.cn/optimization-packages/" target="_blank">optimization package</a>. Several days ago a friend of mine sent me a link about lp-solver, which is a Mixed Integer Linear Programming (MILP) solver, convenient to use and highly efficient, cannot help sharing with you all. (please <a href="http://www.mathfinance.cn/guestbook.php" target="_blank">submit your favorite code site </a> if you happen to find one and help others, thanx.)<br/><br/>The name itself tells you this package is for linear programming problem, What is Linear Programming then? A Linear Program (LP) is a problem that can be expressed as follows:<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;minimize&nbsp;&nbsp; cx<br/>&nbsp;&nbsp;&nbsp;&nbsp;subject to Ax&nbsp;&nbsp;= b<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x >= 0<br/><br/>where x is the vector of variables to be solved for, A is a matrix of known coefficients, and c and b are vectors of known coefficients. The expression "cx" is called the objective function, and the equations "Ax=b" are called the constraints. LP is widely used for portfolio optimization, for instance, to mimic the performance of an index, to minimize tracking error of your portfolio, etc. Don't hesitate to try it yourself.<br/><br/>PS: lp-solver can be called as a library from different languages like C, VB, .NET, Delphi, Excel, Java, ...It can also be called from AMPL, MATLAB, O-Matrix, Scilab, Octave, R via a driver program. you will find a way.<br/><br/>Download at <a href="http://lpsolve.sourceforge.net/5.5/" target="_blank" rel="nofollow">http://lpsolve.sourceforge.net/5.5/</a>.<br/>Tags - <a href="http://www.mathfinance.cn/tags/optimization/" rel="tag">optimization</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/linear-programming-solver/">Mixed Integer Linear Programming (MILP) solver</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/finite-element-pde/</link>
<title><![CDATA[Finite Element package]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Wed, 03 Sep 2008 14:39:16 +0000</pubDate> 
<guid>http://www.mathfinance.cn/finite-element-pde/</guid> 
<description>
<![CDATA[Recently I have been working on pricing a high dimensional (4 dimension, actually) derivative via partial differencial equation (PDE), which can be solved numerically by Finite Element or Finite Difference method. Indeed Matlab has a PDE toolbox to use, however, as I know, this PDE toolbox can only calculate two dimensional problem, for instance, stock and time dimension as <a href="http://www.mathfinance.cn/black_scholes_language/" target="_blank">Black Scholes model</a> does. <br/><br/>For your attention, I found an excellent Finite Element package named <strong>Getfem++</strong> written in C++, as its webpage says, "The Getfem++ project focuses on the development of a generic and efficient C++ library for finite element methods. The goal is to provide a library allowing the computation of any elementary matrix (even for mixed finite element methods) on the largest class of methods and elements, and for arbitrary dimension (i.e. not only 2D and 3D problems). " what's more interesting is this library can be linked easily to Matlab.<br/><br/>We know Finite Element method is an alternative to Finite Difference discretization of the BS and other equations in the price resp. the log-price space variable. The advantage of FE is that it gives convergent deterministic approximations of the option price under realistic, low smoothness assumptions on the payoff function, as e.g. for binary contracts and in particular allow a higher rate of convergence that that achievable with <a href="http://www.mathfinance.cn/Stochastic_simulation/" target="_blank">Monte Carlo simulations</a>.<br/><br/>To get a deeper insight on and download open source <strong>Getfem++</strong> please be at <a href="http://home.gna.org/getfem/" target="_blank" rel="nofollow">http://home.gna.org/getfem/</a> <br/>wiki(Finite element)<br/>Tags - <a href="http://www.mathfinance.cn/tags/finite-element/" rel="tag">finite-element</a> , <a href="http://www.mathfinance.cn/tags/pde/" rel="tag">pde</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/finite-element-pde/">Finite Element package</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/vasicek-binomial-tree/</link>
<title><![CDATA[Vasicek model in binomial tree]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Tue, 02 Sep 2008 16:28:17 +0000</pubDate> 
<guid>http://www.mathfinance.cn/vasicek-binomial-tree/</guid> 
<description>
<![CDATA[At previous post I shared a site using <a href="http://www.mathfinance.cn/vasicek-model-estimation/" target="_blank" rel="nofollow">R language for Vasicek estimation</a>, as we know, Vasicek model is a term structure model describing the stochastic process of interest rates. It is a type of "one-factor model" with negative interest rate possible, despite this shortcoming, it is still applied for fixed income research and application due to its mean-reversion characteristics. <br/><br/>Here is another Vasicek application implemented with binomial tree in C++, the tree construction procedure is outlined in Tuckman famous book <strong>Fixed Income Securities</strong>. By providing input parameters like the initial short rate, speed of mean reversion, long-run average rate and volatility, interest rate following Vasicek evolution is constructed.<br/><br/>For detail check this page <a href="http://math.nyu.edu/~atm262/spring06/ircm/vasicek/" target="_blank" rel="nofollow">http://math.nyu.edu/~atm262/spring06/ircm/vasicek/</a>.<br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/vasicek/" rel="tag">vasicek</a> , <a href="http://www.mathfinance.cn/tags/binomial/" rel="tag">binomial</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/vasicek-binomial-tree/">Vasicek model in binomial tree</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/libor-market-model/</link>
<title><![CDATA[Libor Market Model: Theory and Implementation source code]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Sun, 31 Aug 2008 09:43:19 +0000</pubDate> 
<guid>http://www.mathfinance.cn/libor-market-model/</guid> 
<description>
<![CDATA[Libor Market Model is a term structure model applied to value and hedge exotic interest rate derivatives. The model is recognized and employed largely because of its consistency with the popular market model, Black's formula. This consistency makes the calibration process easy as the Black's market prices for vanilla interest rate Options can be instantly used as an input.<br/><br/>The purpose of this book -Libor Market Model: Theory and Implementation is to analyze the Libor Market Model in theory and implement it practically to the evaluation of normal caps, barriers, <a href="http://www.mathfinance.cn/swaption-valuation/" target="_blank">European swaptions</a> and ratchets, etc. The dynamic of the Libor Market Model will be derived and the whole steps of its implementation applying Monte Carlo simulation will be introduced. Implementation is accomplished via several volatility and correlation formulation. Special attention should be given when it comes to calibrate the Libor Market Model and model the forward rate volatilities and correlations since they could impact prices of interest rate derivatives substantially. <br/><br/>you can download the free c course code by leaving your email at <a href="http://www.irina-goetsch.com/libor-market-model/app#order" target="_blank" rel="nofollow">http://www.irina-goetsch.com/libor-market-model/app#order</a><br/>wiki(LIBOR Market Model)<br/><br/>Tags - <a href="http://www.mathfinance.cn/tags/libor/" rel="tag">libor</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/libor-market-model/">Libor Market Model: Theory and Implementation source code</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/psor-lcp/</link>
<title><![CDATA[PSOR for American option]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Sun, 24 Aug 2008 15:11:58 +0000</pubDate> 
<guid>http://www.mathfinance.cn/psor-lcp/</guid> 
<description>
<![CDATA[We often have to price the American Option with Linear Complementarity Formulation when using finite difference method. One of methods for solving linear complementarity problem is <strong>Projected Successive Over Relaxation (PSOR)</strong>, which is iterative and tries to solve the following formulation:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x'(Ax - b) = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x >= 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ax - b >= 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>using the <strong>projected SOR</strong> algorithm. Here is a sample Matlab code showing the basic algorithem of <strong>PSOR</strong>, <br/>function [x] = psor(A,b,x0)<br/>omega = 1.5;<br/>tol = 1e-9;<br/>jmax = 1e+3;<br/><br/>n = length(b); x = x0; j = 1;<br/>for i = 1:n<br/>x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));<br/>end<br/><br/>while (norm(x-x0) > tol) && (j < jmax)<br/>j = j + 1; x0 = x;<br/>for i = 1:n<br/>x(i) = max(0,x(i)+omega*(b(i)-A(i,:)*x)/A(i,i));<br/>end<br/>end<br/>return<br/><br/>A problem with this sample code is slow computation speed, Should you are happy with C++, the following C++ code which can be called directly in Matlab.&nbsp;&nbsp;<br/><br/><br/><a href="attachment.php?fid=2">Click to download</a><br/>wiki(Linear complementarity problem)<br/>Tags - <a href="http://www.mathfinance.cn/tags/psor/" rel="tag">psor</a> , <a href="http://www.mathfinance.cn/tags/american/" rel="tag">american</a> , <a href="http://www.mathfinance.cn/tags/option/" rel="tag">option</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/psor-lcp/">PSOR for American option</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Black_Derman_Toy/</link>
<title><![CDATA[Monte Carlo Pricer Black Derman Toy Model]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Wed, 30 Jul 2008 07:44:47 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Black_Derman_Toy/</guid> 
<description>
<![CDATA[Financial Quantitative Algorithms<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;below you will find the some sources of the sources in C++ and Java.T<br/><br/> <br/>Table with C++ sources<br/><br/> <br/>Closed expressions and Approximate Models for various Financial Option on Equity<br/>Binary Tree method to Price Options on Equity<br/>Monte Carlo pricer of Exotics<br/>Monte Carlo Pricer of American Calls and Puts<br/>Monte Carlo Pricer of European Barrier, Knock in and out Options<br/>Monte Carlo Pricer European Spread Options<br/>Monte Carlo Pricer of Interest Rate Derivatives (One factor)<br/>Monte Carlo Pricer Ho Lee Model<br/>Monte Carlo Pricer Hull White Model<br/>Monte Carlo Pricer Black Derman Toy Model<br/>Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model<br/>Monte Carlo pricer of exotics with constant Jump-Diffussion<br/>Monte Carlo Pricer of Barrier, Knock in and out Options with Jump-Diffusion<br/>Monte Carlo Pricer European Spread Options with Jump-Diffusion<br/><br/> <br/>Table with Java sources<br/><br/> <br/>Closed expressions and Approximate Models for various Financial Option on Equity<br/>Binary Tree method to Price Options on Equity<br/>Monte Carlo pricer of Exotics<br/>Monte Carlo Pricer of American Calls and Puts<br/>Monte Carlo Pricer of European Barrier, Knock in and out Options<br/>Monte Carlo Pricer European Spread Options<br/>Monte Carlo Pricer of Interest Rate Derivatives (One factor)<br/>Monte Carlo Pricer Ho Lee Model<br/>Monte Carlo Pricer Hull White Model<br/>Monte Carlo Pricer Black Derman Toy Model<br/>Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model<br/>Monte Carlo pricer of exotics with constant Jump-Diffussion<br/>Monte Carlo Pricer of Barrier, Knock in and out Options with Jump-Diffusion<br/>Monte Carlo Pricer European Spread Options with Jump-Diffusion<br/><br/>http://www.javaquant.net/downloads.html<br/>wiki(Black Derman Toy)<br/>Tags - <a href="http://www.mathfinance.cn/tags/bdt/" rel="tag">bdt</a> , <a href="http://www.mathfinance.cn/tags/monte_carlo/" rel="tag">monte carlo</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Black_Derman_Toy/">Monte Carlo Pricer Black Derman Toy Model</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/CDO_Gaussian_Copula/</link>
<title><![CDATA[CDO Pricing in Gaussian Copula]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Mon, 28 Jul 2008 08:20:08 +0000</pubDate> 
<guid>http://www.mathfinance.cn/CDO_Gaussian_Copula/</guid> 
<description>
<![CDATA[CDO prices with Monte Carlo simulation includes the creation of roads in the sample correlation preset times. This defect is sometimes used to calculate payments to fixed and floating legs and worth of each leg.<br/><br/>more at <a href="http://math.nyu.edu/~atm262/spring06/ircm/cdo/index.html" target="_blank" rel="nofollow">http://math.nyu.edu/~atm262/spring06/ircm/cdo/index.html</a><br/><br/><br/>wiki(Collateralized debt obligations)<br/>Tags - <a href="http://www.mathfinance.cn/tags/cdo/" rel="tag">cdo</a> , <a href="http://www.mathfinance.cn/tags/copula/" rel="tag">copula</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/CDO_Gaussian_Copula/">CDO Pricing in Gaussian Copula</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Mersenne_Twister/</link>
<title><![CDATA[Mersenne Twister random number generator]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Sat, 26 Jul 2008 08:21:05 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Mersenne_Twister/</guid> 
<description>
<![CDATA[SFMT is a new variant of Mersenne Twister (MT) introduced by Mutsuo Saito and Makoto Matsumoto in 2006. The algorithm was reported at MCQMC 2006.&nbsp;&nbsp;The article will apper in the proceedings of MCQMC2006. (see Prof. Matsumoto's&nbsp;&nbsp;Papers on random number generation.) SFMT is a Linear Feedbacked Shift Register (LFSR) generator that generates a 128-bit pseudorandom integer at one step. SFMT is designed with recent parallelism of modern CPUs, such as multi-stage pipelining and SIMD (e.g. 128-bit integer) instructions. It supports 32-bit and 64-bit integers, as well as double precision floating point as output.<br/><br/><br/>http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html<br/>wiki(Mersenne Twister)<br/>Tags - <a href="http://www.mathfinance.cn/tags/random/" rel="tag">random</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Mersenne_Twister/">Mersenne Twister random number generator</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Singular_value_decomposition/</link>
<title><![CDATA[Singular value decomposition]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Sat, 26 Jul 2008 08:17:49 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Singular_value_decomposition/</guid> 
<description>
<![CDATA[The singular value decomposition of MxN matrix A is its representation as A = U W V T, where U is an orthogonal MxM matrix, V - orthogonal NxN matrix. The diagonal elements of matrix W are non-negative numbers in descending order, all off-diagonal elements are zeros.<br/><br/>The matrix W consists mainly of zeros, so we only need the first min(M,N) columns (three, in the example above) of matrix U to obtain matrix A. Similarly, only the first min(M,N) rows of matrix V T affect the product. These columns and rows are called left and right singular vectors. <br/><br/><br/><a href="http://www.alglib.net/matrixops/general/svd.php" target="_blank" rel="nofollow">http://www.alglib.net/matrixops/general/svd.php</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/matrix/" rel="tag">matrix</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Singular_value_decomposition/">Singular value decomposition</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/terreneuve/</link>
<title><![CDATA[A lightweight C++ library for quantitative finance applications]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 25 Jul 2008 17:41:59 +0000</pubDate> 
<guid>http://www.mathfinance.cn/terreneuve/</guid> 
<description>
<![CDATA[What is Terreneuve? Simply: "A lightweight C++ library for quantitative finance applications."<br/><br/>In more detail, Terreneuve is our team name for the project in the Fall 2005 Computing in Finance course at NYU's Courant Institute Masters in Math Finance. Working from this specification we hope to design a useable C++ library for some important quantitative finance applications.<br/><br/>Our target audience (aside from our prof ;-)) is students in quantitative finance and those seeking a gentle introduction to financial computing. Obviously, we also intend to use the project as a learning opportunity. We refer those looking for a more comprehensive (and complex) library to the quantlib project.<br/><br/>http://terreneuve.sourceforge.net/<br /><strong>Read the full post at <a href="http://www.mathfinance.cn/terreneuve/">A lightweight C++ library for quantitative finance applications</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Financial_Numerical_Recipes/</link>
<title><![CDATA[C++ Financial Algoritms (Financial Numerical Recipes)]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 25 Jul 2008 17:40:10 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Financial_Numerical_Recipes/</guid> 
<description>
<![CDATA[<div class="quote"><div class="quote-title">Quotation</div><div class="quote-content">In finance, there are areas where formulas tend to get involved. Sometimes it may be easier to follow an exact computer routine. I have made some <strong>C++ subroutines that implements common algoritms in finance</strong>. Typical examples are option/derivatives pricing, term structure calculations, mean variance analysis. These routines are presented together with a good deal of explanations and examples of use, but it is by no means a complete "book" with all the answers and explanations. I'm hoping to turn it into a book, but even in its incomplete state is should provide a good deal of useful algorithms for people working within the field of finance.</div></div><br/><br/>Book and Code are at <a href="http://finance-old.bi.no/~bernt/gcc_prog/index.html" target="_blank" rel="nofollow">http://finance-old.bi.no/~bernt/gcc_prog/index.html</a><br/>Tags - <a href="http://www.mathfinance.cn/tags/finance/" rel="tag">finance</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Financial_Numerical_Recipes/">C++ Financial Algoritms (Financial Numerical Recipes)</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Fast_Greeks_Libor/</link>
<title><![CDATA[Fast Greeks by Simulation in Forward Libor Models]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 25 Jul 2008 08:21:38 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Fast_Greeks_Libor/</guid> 
<description>
<![CDATA[Fast Greeks by Simulation in Forward Libor Models&nbsp;&nbsp;by Prof. Glasserman, paper and code can be downloaded at:<br/><br/>http://www.gsb.columbia.edu/faculty/pglasserman/Other/grklibor.pdf<br/><br/>http://www.gsb.columbia.edu/faculty/pglasserman/Other/greeks_code.zip<br/><br/><br/>wiki(libor)<br/>Tags - <a href="http://www.mathfinance.cn/tags/greeks/" rel="tag">greeks</a> , <a href="http://www.mathfinance.cn/tags/libor/" rel="tag">libor</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Fast_Greeks_Libor/">Fast Greeks by Simulation in Forward Libor Models</a></strong>.
]]>
</description>
</item><item>
<link>http://www.mathfinance.cn/Design_Patterns_Derivatives_Pricing/</link>
<title><![CDATA[Design Patterns and Derivatives Pricing]]></title> 
<author>abiao &lt;&gt;</author>
<category><![CDATA[C++]]></category>
<pubDate>Fri, 25 Jul 2008 08:17:45 +0000</pubDate> 
<guid>http://www.mathfinance.cn/Design_Patterns_Derivatives_Pricing/</guid> 
<description>
<![CDATA[Design patterns are the cutting-edge paradigm for programming in object-oriented languages. Here they are discussed, for the first time in a book, in the context of implementing financial models in C++. Assuming only a basic knowledge of C++ and mathematical finance, the reader is taught how to produce well-designed, structured, re-usable code via concrete examples. Each example is treated in depth, with the whys and wherefores of the chosen method of solution critically examined. Part of the book is devoted to designing re-usable components that are then put together to build a Monte Carlo pricer for path-dependent exotic options. Advanced topics treated include the factory pattern, the singleton pattern and the decorator pattern. Complete ANSI/ISO-compatible C++ source code is included on a CD for the reader to study and re-use and so develop the skills needed to implement financial models with object-oriented programs and become a working financial engineer.<br/><br/>a copy of the c++ code is available to download at http://www.markjoshi.com/design/<br/>Tags - <a href="http://www.mathfinance.cn/tags/derivative/" rel="tag">derivative</a><br /><strong>Read the full post at <a href="http://www.mathfinance.cn/Design_Patterns_Derivatives_Pricing/">Design Patterns and Derivatives Pricing</a></strong>.
]]>
</description>
</item>
</channel>
</rss>