Package: RTL 1.3.6

RTL: Risk Tool Library - Trading, Risk, 'Analytics' for Commodities

A toolkit for Commodities 'analytics', risk management and trading professionals. Includes functions for API calls to <https://commodities.morningstar.com/#/>, <https://developer.genscape.com/>, and <https://www.bankofcanada.ca/valet/docs>.

Authors:Philippe Cote [aut, cre], Nima Safaian [aut]

RTL_1.3.6.tar.gz
RTL_1.3.6.zip(r-4.5)RTL_1.3.6.zip(r-4.4)RTL_1.3.6.zip(r-4.3)
RTL_1.3.6.tgz(r-4.4-x86_64)RTL_1.3.6.tgz(r-4.4-arm64)RTL_1.3.6.tgz(r-4.3-x86_64)RTL_1.3.6.tgz(r-4.3-arm64)
RTL_1.3.6.tar.gz(r-4.5-noble)RTL_1.3.6.tar.gz(r-4.4-noble)
RTL_1.3.6.tgz(r-4.4-emscripten)RTL_1.3.6.tgz(r-4.3-emscripten)
RTL.pdf |RTL.html
RTL/json (API)
NEWS

# Install 'RTL' in R:
install.packages('RTL', repos = c('https://risktoollib.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/risktoollib/rtl/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • cma - Metadata for WTI CMA
  • crudeOil - Dataset: crude assays
  • cushing - Dataset: WTI Cushing Futures and storage utilization
  • dflong - Dataset: commodity prices in a long dataframe format
  • dfwide - Dataset: commodity prices in a wide dataframe format
  • eiaStocks - Dataset: EIA weekly stocks
  • eiaStorageCap - Dataset: EIA working storage capacity
  • eurodollar - Dataset: Eurodollar futures contracts
  • expiry_table - Dataset: expiry of common commodity futures contract.
  • fizdiffs - Dataset: randomised physical crude differentials
  • futuresRef - Dataset: futures contracts metadata
  • fxfwd - Dataset: USDCAD FX forward rates
  • holidaysOil - Dataset: NYMEX and ICE holiday calendars
  • ohlc - Dataset: randomiser to convert settlement into OHLC
  • planets - Dataset: IR compounding
  • refineryLPdata - Dataset: refinery LP model sample inputs and outputs
  • spot2futConvergence - Dataset: spot to futures convergence
  • spot2futCurve - Dataset: spot to futures convergence curve
  • steo - Dataset: EIA Short Term Energy Outlook
  • stocks - Dataset: Yahoo Finance data sets
  • tickers_eia - Datasest: metadata of key EIA tickers grouped by products.
  • tradeCycle - Dataset: Canadian and US physical crude trading calendars
  • tradeHubs - Dataset: GIS locations for crude oil trading hubs
  • tradeprocess - Dataset: data for teaching the various ways to monetize a market call.
  • tsQuotes - Dataset: interest rate curve data for RQuantlib .
  • usSwapCurves - Dataset: US bootstrapped interest rate curve.
  • usSwapCurvesPar - Dataset: US bootstrapped interest rate curve parallel sample.
  • wtiSwap - Dataset: WTI Calendar Month Average Swap pricing data

On CRAN:

analyticsapicommoditiescommodities-apifinancegenscapemorningstarpythonrisk-management

7.43 score 28 stars 162 scripts 454 downloads 10 mentions 41 exports 131 dependencies

Last updated 2 months agofrom:cf64647691. Checks:OK: 3 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 23 2024
R-4.5-win-x86_64OKNov 23 2024
R-4.5-linux-x86_64OKNov 23 2024
R-4.4-win-x86_64NOTENov 23 2024
R-4.4-mac-x86_64NOTENov 23 2024
R-4.4-mac-aarch64NOTENov 23 2024
R-4.3-win-x86_64NOTENov 23 2024
R-4.3-mac-x86_64NOTENov 23 2024
R-4.3-mac-aarch64NOTENov 23 2024

Exports:%>%bondchart_eia_sdchart_eia_steochart_fwd_curveschart_pairschart_PerfSummarychart_spreadschart_zscoreCRReuroCRROptionefficientFrontiereia2tidyeia2tidy_allfitOUgarchGBSOptiongetBoCgetCurvegetGenscapePipeOilgetGenscapeStorageOilgetGISgetPricegetPricesnpvpromptBetarefineryLPreturnsrolladjustsimGBMsimMultivariatessimOUsimOUJsimOUtswapCOMswapFutWeightswapInfoswapIRStradeStatstradeStrategyDYtradeStrategySMA

Dependencies:anytimeaskpassbase64encBHbitbit64bslibcachemclassclicliprclockcodetoolscolorspacecpp11crayoncrosstalkcurldata.tablediagramdigestdplyrellipsisevaluatefansifarverfastmapfontawesomeforcatsforecastfracdifffsfurrrfuturefuture.applygenericsggplot2globalsgluegowergtablehardhathighrhmshtmltoolshtmlwidgetshttripredisobandjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelavalazyevallifecyclelistenvlmtestlubridatemagrittrMASSMatrixmemoisemgcvmimemunsellnlmennetnumDerivopensslpadrparallellyPerformanceAnalyticspillarpkgconfigplotlyprettyunitsprodlimprogressprogressrpromisespurrrquadprogquantmodR6rappdirsRColorBrewerRcppRcppArmadilloRcppRollreadrrecipesrlangrmarkdownrpartrsamplesassscalesshapesliderSQUAREMstringistringrsurvivalsystibbletidyrtidyselecttimechangetimeDatetimetktinytextseriestsfeaturestsibbleTTRtzdburcautf8vctrsviridisLitevroomwarpwithrxfunxtsyamlzoo

Readme and manuals

Help Manual

Help pageTopics
Bond pricingbond
EIA weekly supply-demand information by product groupchart_eia_sd
EIA Short Term Energy Outlookchart_eia_steo
Plots historical forward curveschart_fwd_curves
Pairwise scatter plots for timeserieschart_pairs
Cumulative performance and drawdown summary.chart_PerfSummary
Futures contract spreads comparison across yearschart_spreads
Z-Score applied to seasonal data divergencechart_zscore
metadata for WTI CMAcma
Cox-Ross-Rubinstein binomial option modelCRReuro
Cox-Ross-Rubinstein Option Pricing ModelCRROption
dataset: crude assayscrudeOil
dataset: WTI Cushing Futures and storage utilizationcushing
dataset: commodity prices in a long dataframe formatdflong
dataset: commodity prices in a wide dataframe formatdfwide
Markowitz Efficient FrontierefficientFrontier
EIA API call with tidy outputeia2tidy
EIA API multiple calls with tidy outputeia2tidy_all
dataset: EIA weekly stockseiaStocks
dataset: EIA working storage capacityeiaStorageCap
dataset: Eurodollar futures contractseurodollar
dataset: expiry of common commodity futures contract.expiry_table
Fits a Ornstein–Uhlenbeck process to a datasetfitOU
dataset: randomised physical crude differentialsfizdiffs
dataset: futures contracts metadatafuturesRef
dataset: USDCAD FX forward ratesfxfwd
Wrapper for a Garch(1,1) returning either a plot or data.garch
Generalized Black-Scholes (GBS) Option Pricing ModelGBSOption
Bank of Canada Valet APIgetBoC
Morningstar Commodities API forward curvesgetCurve
Genscape API call for oil pipelinesgetGenscapePipeOil
Genscape API call for oil storagegetGenscapeStorageOil
Extract and convert GIS data from a URLgetGIS
Morningstar Commodities API single callgetPrice
Morningstar Commodities API multiple callsgetPrices
dataset: NYMEX and ICE holiday calendarsholidaysOil
NPVnpv
dataset: randomiser to convert settlement into OHLCohlc
dataset: IR compoundingplanets
Computes betas of futures contracts with respect to the 1st line contractpromptBeta
LP model for refinery optimizationrefineryLP
dataset: refinery LP model sample inputs and outputsrefineryLPdata
Compute absolute, relative or log returns.returns
Adjusts daily returns for futures contracts rollrolladjust
GBM process simulationsimGBM
Multivariate normal from historical datasetsimMultivariates
OU process simulationsimOU
OUJ process simulationsimOUJ
OU process simulationsimOUt
dataset: spot to futures convergencespot2futConvergence
dataset: spot to futures convergence curvespot2futCurve
dataset: EIA Short Term Energy Outlooksteo
dataset: Yahoo Finance data setsstocks
Commodity Calendar Month Average SwapsswapCOM
Commodity Calendar Month Average Swap futures weightsswapFutWeight
Commodity Swap details to learn their pricingswapInfo
Interest Rate SwapswapIRS
datasest: metadata of key EIA tickers grouped by products.tickers_eia
dataset: Canadian and US physical crude trading calendarstradeCycle
dataset: GIS locations for crude oil trading hubstradeHubs
dataset: data for teaching the various ways to monetize a market call.tradeprocess
Risk-reward statistics for quant tradingtradeStats
Sample quantitative trading strategytradeStrategyDY
Sample quantitative trading strategytradeStrategySMA
dataset: interest rate curve data for RQuantlib .tsQuotes
dataset: US bootstrapped interest rate curve.usSwapCurves
dataset: US bootstrapped interest rate curve parallel sample.usSwapCurvesPar
dataset: WTI Calendar Month Average Swap pricing datawtiSwap