![]() ![]() The payoff diagram is created by a local regression, or more precisely locally estimated scatterplot smoothing or LOESS. the loessplot function, does is to create a scatter plot from the respective price series and a benchmark (normally an index to compare it with) and superimpose a payoff diagram. Loessplot ROC() |> coredata() |> na.omit() |> ame() # Registered S3 method overwritten by 'quantmod': ![]() # The following objects are masked from 'package:base': Once again we will stand on the shoulders of giants by using the mighty quantmod package (on CRAN) and a not so well-known function from Base R, scatter.smooth (to run the code you must have R ≥ 4.1.0 installed): If you want to get your hands on a simple R script that creates an easy-to-understand plot (a profit & loss profile or payoff diagram) out of any price series, read on! Why not simply translate one into the other? But everybody understands the meaning of rising and falling markets. Not many people understand the financial alchemy of modern financial investment vehicles, like hedge funds, that often use sophisticated trading strategies.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |