{"id":13740558,"url":"https://github.com/bbcho/risktools-dev","last_synced_at":"2025-04-10T05:02:34.254Z","repository":{"id":44948958,"uuid":"219420947","full_name":"bbcho/risktools-dev","owner":"bbcho","description":"Risk tools for commodities trading and finance","archived":false,"fork":false,"pushed_at":"2024-12-07T19:43:58.000Z","size":48548,"stargazers_count":28,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T02:11:14.727Z","etag":null,"topics":["cme","commodities","crude","eia","finance","morningstar","nymex","oil","oil-and-gas","python","risk","risk-management","swaps"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbcho.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-04T05:02:01.000Z","updated_at":"2025-03-14T02:01:46.000Z","dependencies_parsed_at":"2023-02-07T21:46:34.673Z","dependency_job_id":"8b947af8-02b6-40fd-a8aa-6c9e04a8b1f4","html_url":"https://github.com/bbcho/risktools-dev","commit_stats":{"total_commits":251,"total_committers":6,"mean_commits":"41.833333333333336","dds":0.07569721115537853,"last_synced_commit":"f6ee6042e4c960df734e21a56ae59cc62241d4d3"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcho%2Frisktools-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcho%2Frisktools-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcho%2Frisktools-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbcho%2Frisktools-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbcho","download_url":"https://codeload.github.com/bbcho/risktools-dev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161270,"owners_count":21057554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cme","commodities","crude","eia","finance","morningstar","nymex","oil","oil-and-gas","python","risk","risk-management","swaps"],"created_at":"2024-08-03T04:00:49.665Z","updated_at":"2025-04-10T05:02:34.168Z","avatar_url":"https://github.com/bbcho.png","language":"Jupyter Notebook","readme":"# risktools\n\nPython implementation of the R package RTL.  \n\nSee CRAN for original R version\n\nhttps://cran.r-project.org/web/packages/RTL/index.html\n\n## Purpose\n\n    Purposely designed functions for trading, trading analytics and risk practitioners in Commodities and Finance.\n    Build to support delivery of Finance classes from one of the co-authors of RTL at the Alberta School of Business.\n\n## Version Notes\n\n    Note that the latest version will require compilation on Windows for python version 3.11 due to the \n    dependency on arch. Arch does not come with binaries and must be compiled on Windows which can be\n    avoided by installing numba, however numba is not yet available for python 3.11.\n\n## Features\n\n    Historical forward curves charting.\n\n    Calendars and expiry dates data objects for a wide range of commodity futures contracts.\n\n    roll_adjust to adjust continuous contracts returns for roll adjustments using expiries above.\n\n    Morningstar Marketplace API functions getPrice(), getPrices() and getCurve() using your own Morningstar credentials. Current feeds included:\n        ICE_EuroFutures\n        ICE_EuroFutures_continuous\n        CME_NymexFutures_EOD\n        CME_NymexFutures_EOD_continuous\n        CME_NymexOptions_EOD\n        CME_CbotFuturesEOD\n        CME_CbotFuturesEOD_continuous\n        CME_Comex_FuturesSettlement_EOD\n        CME_Comex_FuturesSettlement_EOD_continuous\n        LME_AskBidPrices_Delayed\n        SHFE_FuturesSettlement_RT\n        CME_CmeFutures_EOD\n        CME_CmeFutures_EOD_continuous\n        CME_STLCPC_Futures\n        CFTC_CommitmentsOfTradersCombined\n        ICE_NybotCoffeeSugarCocoaFutures\n        ICE_NybotCoffeeSugarCocoaFutures_continuous\n        Morningstar_FX_Forwards\n        ERCOT_LmpsByResourceNodeAndElectricalBus\n        PJM_Rt_Hourly_Lmp\n        AESO_ForecastAndActualPoolPrice\n        LME_MonthlyDelayed_Derived\n        … see ?getPrice for up to date selection and examples.\n\n    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.\n\n    chart_eia_steo() and chart_eia_sd() return either a chart or dataframe of supply demand balances from the EIA.\n\n    chart_spreads() to generate specific contract spreads across years e.g. ULSD March/April. Requires Morningstar credentials.\n\n    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.\n\n## Data Sets\n\nAccessible via risktools.data.open_data(datsetname). Also use risktools.data.get_names() to get list of available data.\n\n    expiry_table: Historical and forward futures contract metadata.\n    holidaysOil: Holiday calendars for ICE and NYMEX.\n    tickers_eia: Mapping of EIA tickers to crude and refined products markets for building supply demand balances.\n    usSwapIRDef: Data frame of definitions for instruments to build a curve for use with RQuantlib. Use getIRswapCurve() to extract the latest data from FRED and Morningstar.\n    usSwapIR: Sample data set output of getIRswapCurve.\n    usSwapCurves: Sample data set output of RQuantlib::DiscountCurve().\n    cancrudeassays contains historical Canadian crude assays by batch from Crudemonitor. cancrudeassayssum is a summarised average assays version.\n    crudeassaysXOM for all publicly available complete assays in Excel format from ExxonMobil\n    crudeassaysBP for all publicly available complete assays in Excel format from BP\n    eiaStocks: Sample data set of EIA.gov stocks for key commodiities.\n    eiaStorageCap: EIA crude storage capacity by PADD.\n    dflong and dfwide contain continuous futures prices sample data sets for Nymex (CL, HO, RB and NG contracts) and ICE Brent.\n    crudepipelines and refineries contain GIS information in the North American crude space.\n    ...\n\nUsernames and password for API services are required.\n\n## Changelog\n\n### Version 0.2.0\n\nNew functions added:\n- get_curves\n- get_gis\n- get_ir_swap_curve\n- refineryLP\n- swap_fut_weight\n- swap_info\n- dist_desc_plot\n\nNew feeds for get_prices:\n- ERCOT_LmpsByResourceNodeAndElectricalBus\n- PJM_Rt_Hourly_Lmp\n- AESO_ForecastAndActualPoolPrice\n- LME_MonthlyDelayed_Derived\n- SHFE_FuturesSettlement_RT\n- CFTC_CommitmentsOfTradersCombined\n\nNew datasets for risktools.data.open_data function\n- Replicated/refreshed RTL datsets\n\nremoved geojson files and dependencies to geopandas - replaced with get_gis function\nremoved support for Python 3.6. Supports \u003e= 3.7\n\nCompanion package to https://github.com/bbcho/finoptions-dev\n\n","funding_links":[],"categories":["Python"],"sub_categories":["Risk Analysis","风险分析"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbcho%2Frisktools-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbcho%2Frisktools-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbcho%2Frisktools-dev/lists"}