Finance includes many subfields. In this book we considered only option pricing, econometric estimation and simulation of financial models and analysis of financial data. But finance also includes important fields like trading and portfolio optimization. The family of packages offers several opportunities in this direction.
For example, the fPortfolio package from Rmetrics implements Markowitz Portfolio Theory, Mean-Variance Frontiers, Mean-CVaR, etc., but also offers a framework for backtesting analysis. The fPortfolio package comes with an additional ebook Würtz et al. (2009), which is worth reading. The package portfolio focuses on equity portfolio strategies and also implements matching portfolios for benchmark comparisons. Another interesting solution in this direction is the backtest package. We should also mention PerformanceAnalytics which is a library of functions designed for evaluating the performance and risk characteristics of financial assets or funds. Another growing library of packages is dedicated to trading. We mention just a few: fTrading for basic trading analysis; TTR to construct technical trading rules and ttrTests for testing these rules; IBrokers which is a set of API to interact with the Interactive Brokers Trader Workstation. For ...