pressure_factor-methods: Market participant pressure factor

Description Usage Arguments Value

Description

Provided with futures contract front price and term structure aggregated position data from Bloomberg retrieved with pullit, constructs market participant pressure factors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pressure_factor(
  price_data,
  position_data,
  format = "disaggregated",
  underlying = "futures only",
  unit = "contracts",
  participant = "producer/merchant/processor/user",
  update_frequency = "month",
  return_frequency = "day",
  ranking_period = 6L,
  long_threshold = 0.5,
  short_threshold = 0.5,
  sort_levels = T,
  weighted = F
)

## S4 method for signature 'FuturesTS,FuturesCFTC'
pressure_factor(
  price_data,
  position_data,
  format = "disaggregated",
  underlying = "futures only",
  unit = "contracts",
  participant = "producer/merchant/processor/user",
  update_frequency = "month",
  return_frequency = "day",
  ranking_period = 6L,
  long_threshold = 0.5,
  short_threshold = 0.5,
  sort_levels = T,
  weighted = F
)

Arguments

price_data

an S4 object of class FuturesTS. FuturesTS objects are returned by the BBG_futures_TS function in the pullit package.

position_data

an S4 object of class FuturesCFTC. FuturesCFTC objects are returned by the BBG_futures_CFTC function in the pullit package.

format

a scalar character vector. Specifies the CFTC report format to use for calculating participant pressure: 'disaggregated', 'legacy', 'supplemental' or 'traders in financial futures'. Defaults to 'disaggregated'.

underlying

a scalar character vector. Specifies the underlying instrument type to use for calculating participant pressure: 'futures only' or 'futures & options'. Defaults to 'futures only'.

unit

a scalar character vector. Specifies the unit to use for calculating participant pressure: 'contracts' or 'traders'. Defaults to 'contracts'.

participant

a scalar character vector. Specifies the participant to use for calculating market pressure. Format specific: 'producer/merchant/processor/user', 'managed money', 'swap dealers' or 'other reportables' (disaggregated); 'commercial', 'non-commercial', 'non-reportable' or 'total' (legacy); 'commercial - non-CIT', 'non-commercial - non-CIT', or 'index traders' (supplemental); 'asset manager/institutional', 'dealer/intermediary', 'leveraged funds', 'other reportables' (traders in financial futures).

update_frequency

a scalar character vector. Specifies the rebalancing frequency. Must be one of 'year', 'semester', 'quarter', 'month' or 'week'. Defaults to 'month'.

return_frequency

a scalar character vector. Specifies the frequency of the returns output. Must be one of 'year', 'semester', 'quarter', 'month', 'week' or 'day'. Defaults to 'day'.

ranking_period

a scalar integer vector. Specifies number of periods in term of update_frequency looking backward for average CHP calculation. Defaults to 1 where sort is done on last observation only.

long_threshold

a scalar numeric vector. Specifies the threshold for short positions. Default: 0.5.

short_threshold

a scalar numeric vector. Specifies the threshold for long positions. Default: 0.5.

sort_levels

a scalar logical vector. If TRUE sorts on pressure levels, else on relative changes in pressure. Defaults to TRUE.

weighted

a scalar logical vector. If TRUE adjusts portoflio weights with respect to pressure, else equal weights are used. Defaults to FALSE.

Value

An S4 object of class PressureFactor.


bautheac/factorem documentation built on June 7, 2021, 12:11 p.m.