efficientFrontier: Markowitz Efficient Frontier

View source: R/efficientFrontier.R

efficientFrontierR Documentation

Markowitz Efficient Frontier

Description

Generates random portfolio weights statistics based on absolute returns.

Usage

efficientFrontier(
  nsims = 5000,
  x = RTL::fizdiffs %>% dplyr::select(date, dplyr::contains("WCS")),
  expectedReturns = NULL
)

Arguments

nsims

Number of portfolio simulations. Defaults to 5000

x

List as provided by output of RTL::simMultivariates().

expectedReturns

Defaults to NULL using periodic returns means.

Details

Commodities

Unlike traditional portfolio management, in commodities many transactions are with derivatives (futures and swaps) and have zero or low initial investments.

Return types

This function is used for commodities where returns are dollars per units for real assets e.g. storage tanks, pipelines...Here we measure directly the periodic return in dollars per contract unit.

Empirical Finance

I would encourage you to pick a commodity futures contract of your choice and draw a scatter plot of price level versus the daily dollar per unit change as measure of risk. As a trading analyst or risk manager, then ask yourself about the implications of using log returns that you then re-apply to current forward curve level to arrive at a dollar risk measure per units instead of measuring directly risk in dollars per unit.

Value

List of portfolios and chart of efficient frontier

Author(s)

Philippe Cote

Examples

x =  RTL::fizdiffs %>% dplyr::select(date, dplyr::contains("WCS"))
efficientFrontier(nsims = 10, x = x, expectedReturns = NULL)
efficientFrontier(nsims = 10, x = x, expectedReturns = c(0.5,0.8,0.9))

RTL documentation built on June 17, 2022, 5:06 p.m.