Giter Site home page Giter Site logo

ushoard's Introduction

UShoard

The goal of UShoard is to show Data of Sales Volume of US Treasury Bills and Bonds

Example

This is a basic example which shows how to aquire US Treasure Bill and Bonds time indexed by 'issue date'

#' ## issue dates
#' treasuryTRISS10YEARNOTE <- getSymbols("TRISS10YEARNOTE", src = "treasury", auto.assign = FALSE)
#' head(treasuryTRISS10YEARNOTE)
#'

This is a basic example which shows how to aquire US Treasure Bill and Bonds time indexed by 'maturity date'

#' ## maturity dates
#' treasuryTRMTR10YEARNOTE <- getSymbols("TRMTR10YEARNOTE", src = "treasury", auto.assign = FALSE)
#' head(treasuryTRMTR10YEARNOTE)
#' tail(treasuryTRMTR10YEARNOTE)

ushoard's People

Contributors

andremikulec avatar

Watchers

 avatar James Cloos avatar

ushoard's Issues

Need to cache or memo[ise] calls to getSymbols

Need to cache

getSymbols.treasury <- function (Symbols, env, return.class = "xts", ...)

Once per day is sufficient.
No need exists to re-bomb the website during testng or development.

Bills UNITS may have changed in 2009?

I have to verify (and fix this)

#' > treasuryTRISS13WEEKBILL[, "TRISS13WEEKBILL.TOTAL_ISSUE"]["2007/2008"]
#' TRISS13WEEKBILL.TOTAL_ISSUE
#' 2007-01-04 24081
#' 2007-01-11 23893
#' 2007-01-18 24049

#' > treasuryTRISS13WEEKBILL[, "TRISS13WEEKBILL.TOTAL_ISSUE"]["2018"]
#' TRISS13WEEKBILL.TOTAL_ISSUE
#' 2018-01-04 48.00076
#' 2018-01-11 48.00043

Need a list of SYMBOLS

No one knows how to figure out 'what the symbols' are except me.

Need a "viewSymbols."
R package quantmod has a showSymbols

showSymbols:
Objects loaded by getSymbols with auto.assign=TRUE can be viewed with showSymbols

package TTR has private method to get all of the symbols from nasdaq.

TTR::stockSymbols
https://www.nasdaq.com/screening/companies-by-name.aspx

This ability so lacking, so this is called a BUG and not an ENHANCEMENT.

Need a testthat test of formatReportAllotment

This is complicated search and replace code ( creating the symbols).
This sometime may easily break.

formatReportAllotment <- function(df, AllotmentCat, AllotmentCol, unAllotmentCol ) {
tryCatchLog::tryCatchLog({
initEnv();on.exit({uninitEnv()})

select(df, - "cusip", - unAllotmentCol) %>%
mutate( security = str_c(AllotmentCat, security) ) %>%
MoveFront(c("security", AllotmentCol, "rate")) -> df

mutate(df, security = toupper(security)
, security = str_c("TR", security)
, security = str_replace_all(security, "[ ]+", "")
, security = str_replace_all(security, "-+", "")
) -> df
df

})}

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.