New answers tagged r
I would suggest you to add spreads to the implied hazard rates, spreads that you regress on the macroeconomic factors. Then you stress by calculating the spreads corresponding to the stressed factors.
There is an approach called Model Predictive Control which optimizes the state trajectory of a system over time. There doesn't seem to be suitable R packages, but I can recommend the YALMIP package as probably being a good place to start: http://users.isy.liu.se/johanl/yalmip/
There is no guarantee that the optimization method always converges! In an introduction the author of the package recommends using the "hybrid" solver, which starts out with the "solnp" and goes through the other solvers, if it doesn't converge. According to him, this should at least guarantee convergence in 90 % of the cases. ...
Are you aware of the findata.org site and its directory? The code is also in a bazaar repository as well as GitHub repo.
I like Quantlib http://quantlib.org/index.shtml http://cran.r-project.org/web/packages/RQuantLib/index.html The QuantLib project is aimed at providing a comprehensive software framework for quantitative finance. QuantLib is a free/open-source library for modeling, trading, and risk management in real-life. QuantLib is written in C++ with a clean object ...
You can use the PerformanceAnalytics package , and get the following charts, Cumulative Returns, Daily Returns as well as Drawdown for understanding the time series. Code: library("PerformanceAnalytics") charts.PerformanceSummary( ROC(eq, n = 1, type = "discrete"), main = "Returns (PerformanceAnalytice::charts.PerformanceSummary)" )
You may want to try http://www.deriscope.com for a freeware Excel addin that assists in getting live feeds from Yahoo Finance within Excel. Disclosure: answerer is author of the package.
A free to use Excel Add-on providing QuantLib-backed derivatives pricing analytics directly in Excel is available at http://www.deriscope.com Disclosure: answerer is author of the package.
Top 50 recent answers are included