Coder Social home page Coder Social logo

risktoollib / rtl Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 8.0 171.72 MB

R package for commodities and finance analytics. Sister python package details below.

License: Other

R 92.07% C++ 5.09% C 0.03% Rez 0.62% JavaScript 2.19%
analytics api commodities commodities-api finance genscape morningstar python r risk-management

rtl's People

Contributors

risktoollib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtl's Issues

rolladjust drops first row

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)

promptBeta term

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.

chart_spreads function bug

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.

promptBeta NLS formula

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

returns dropping first row

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])

FR: add a pkgdown site?

It would make it easier to browse documentation
Locally, you would only run

usethis::use_pkgdown_github_pages()

Thanks

chart_zscore

I don't think the 'stats' output returns the right data.

chart_eia_sd

EIAkey is not defined in mutate command. It should be key which is the argument name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.