risktoollib / rtl Goto Github PK
View Code? Open in Web Editor NEWR package for commodities and finance analytics. Sister python package details below.
License: Other
R package for commodities and finance analytics. Sister python package details below.
License: Other
It's probably a better idea to make assumptions on the structure of the df (i.e. contracts come in order of expiry) rather than assume that the contract expiry order will be implied in the column names with numbers. I'm going to make that change to the python version.
I don't think the 'stats' output returns the right data.
@risktoollib rgdal was archived two days ago, so please do move to submit an updated version of RTL as soon as possible. See https://github.com/r-spatial/evolution https://r-spatial.github.io/evolution/ for details.
It would make it easier to browse documentation
Locally, you would only run
usethis::use_pkgdown_github_pages()
Thanks
Using your example:
cpairs <- dplyr::tibble(year = c("2014","2019","2020"),
first = c("@HO4H","@HO9H","@ho0h"),
second = c("@HO4J","@HO9J","@HO0J"))
ou <- chart_spreads(cpairs = cpairs, daysFromExpiry = 200, from = "2012-01-01",
conversion = 42,feed = "CME_NymexFutures_EOD",
iuser = username, ipassword = password,
title = "March/April ULSD Nymex Spreads",
yaxis = "$ per bbl",
output = "chart")
the 2019 and 2020 spreads only return 170 and 169 days respectively. 2014 returns 200 days as expected.
EIAkey is not defined in mutate command. It should be key which is the argument name
is there a need to drop the first row? I don't think so....
df <- df %>% dplyr::filter(!date %in% sort(unique(df$date))[1])
rolladjust drops first row because x$expiry <- lag(x$expiry) creates a null value at the beginning. you should fill in the null with a zero before running
x <- x %>% dplyr::filter(expiry != 1) %>% dplyr::select(-expiry)
API limit is 5000, which results in needing to run multiple queries and combine them to extract a time series. Action is to build logic to return it as a clean series based on user specific start and end date.
argument EIAkey is not defined
argument name is key, but EIAkey is used to call EIA API leading to an error.
chart_fwd_curves.R
distdescplot.R
garch.R
promptBeta.R
rolladjust.R
res output type fails on check
you might get a better fit to the beta curve if you add a third degree of freedom using a constant bias. So the formula would be beta ~ x0exp(x1prompt)+x2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.