Here is my attempt at a forwards class. The code is straightforward for forward contracts on underlyings with well defined market prices (bonds, stocks, commodities) and an implementation of a bond forward/repo class is provided. Forwards on rates (loans/deposits) can be done with some tweaking- I also wrote a (derived) FRA class to show how it can be done. (Another way the FRA could be done is to create a Loan/Deposit/IAM class and pass such an object to the bond forward constructor, but this would have more overhead). IR futures (and convexity adjustments) haven't been touched.
I would be happy to make changes if anyone can point out errors. The unit tests need to be done for the derived classes. At present, I give one test example for the repo (consistency with a fincad calculation). Would need a few more (if anyone can provide any known answers). The test for the FRA at this point is a consistency check with a termstructure derived
from 3 month term FRA's input into the FraRateHelpers class- would also need more tests here.
The attached tar file contains the relevant source code. I ran doxygen on it, so there is also an html directory. I compiled on cygwin, QL 3.11.
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
Great rates starting at 1¢/min.