risktoollib/RTL has 35 GitHub stars and 8 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-12 10:59 UTC. Last push 2026-11-10.
R package for commodities and finance analytics. Sister python package details below.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalOverview
RTL is a purposely designed for traders, analysts and risk practitioners in Commodities and Finance. It also supports delivery of Finance classes from one of the creator also in Academics at the Alberta School of Business.
Send feedback to [email protected]. We welcome feedback, suggestions
and collaboration.
Energy Markets Reference Data
expiry_table: NYMEX and ICE contracts expiry tables.holidaysOil: Holiday calendars for NYMEX and ICE.tradeCycle: US and Canadian crude oil trading calendars.tickers_eia: Mapping of EIA tickers to crude and refined products markets for building supply demand balances.eiaStorageCap: Historical EIA crude storage capacity by PADD.eiaStocks: Sample data set of EIA.gov stocks for key commodities.
Swap Pricing and Contract Roll Adjustement
rolladjust()adjusts continuous contracts returns for roll adjustments usingexpiry_table.swapCOM()computes Calendar Month Average commodity swap prices.swapInfo()returns all information required to price first line futures contract averaging swap or CMA physical trade, including a current month instrument with prior settlements.swapIRS()computes IRS swap prices.
Charting
chart_fwd_curves(): plots historical forward curves, a useful feature to understand the pricing dynamics of a market.chart_zscore()supports seasonality adjusted analysis of residuals, particularly useful when dealing with commodity stocks and/or days demand time series with trends as well as non-constant variance across seasonal periods.chart_eia_steo()andchart_eia_sd()return either a chart or dataframe of supply demand balances from the EIA.chart_spreads()to generate specific contract spreads across years e.g. ULSD March/April. Requires Morninstar credentials.- …
APIs
Valid credentials for commercial API services are required.
Genscape
Genscape API functions:
getGenscapeStorageOil().getGenscapePipeOil().
Zema Marketplace
Zema Marketplace API functions:
getPrice(),getPrices()andgetCurve()using your own Zema credentials. Current feeds included:- ICE_EuroFutures and ICE_EuroFutures_continuous.
- CME_NymexFutures_EOD and CME_NymexFutures_EOD_continuous.
- CME_NymexOptions_EOD.
- CME_CbotFuturesEOD and CME_CbotFuturesEOD_continuous.
- CME_Comex_FuturesSettlement_EOD and CME_Comex_FuturesSettlement_EOD_continuous.
- LME_AskBidPrices_Delayed.
- CME_CmeFutures_EOD and CME_CmeFutures_EOD_continuous.
- CME_STLCPC_Futures.
- ICE_NybotCoffeeSugarCocoaFutures and ICE_NybotCoffeeSugarCocoaFutures_continuous.
- … see
?getPricefor up to date selection and examples.
GIS Dataset
EIA
- crudepipelines <-
getGIS(url = "https://www.eia.gov/maps/map_data/CrudeOil_Pipelines_US_EIA.zip") - refineries <-
getGIS(url = "https://www.eia.gov/maps/map_data/Petroleum_Refineries_US_EIA.zip") - productspipelines <-
getGIS(url = "https://www.eia.gov/maps/map_data/PetroleumProduct_Pipelines_US_EIA.zip") - productsterminals <-
getGIS(url = "https://www.eia.gov/maps/map_data/PetroleumProduct_Terminals_US_EIA.zip") - ngpipelines <-
getGIS(url = "https://www.eia.gov/maps/map_data/NaturalGas_InterIntrastate_Pipelines_US_EIA.zip") - ngstorage <-
getGIS(url = "https://www.eia.gov/maps/map_data/PetroleumProduct_Terminals_US_EIA.zip") - nghubs <-
getGIS(url = "https://www.eia.gov/maps/map_data/NaturalGas_TradingHubs_US_EIA.zip") - lngterminals <-
getGIS(url = "https://www.eia.gov/maps/map_data/Lng_ImportExportTerminals_US_EIA.zip") tradeHubshas North Americas crude oil trading hubs (WIP).
Alberta Oil Sands, Petroleum and Natural Gas
- AB <-
getGIS(url = "https://gis.energy.gov.ab.ca/GeoviewData/OS_Agreements_Shape.zip")
Interest Rates
usSwapIR: Sample data set output ofgetIRswapCurve.usSwapCurves: Sample data set output ofRQuantlib::DiscountCurve().
Python
A python version of RTL for most functions is available at https://pypi.org/project/risktools/.
Installation
Latest Package devtools::install_github("risktoollib/RTL")
CRAN Stable install.packages("RTL")
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,618 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,859 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,472 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,495 stars