Giter VIP home page Giter VIP logo

automated_trading_with_r's Introduction

automated_trading_with_r's People

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  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  avatar  avatar  avatar  avatar  avatar  avatar

automated_trading_with_r's Issues

'probs' outside [0,1]

Hi, Chris, I am going through your book and downloaded the code from this repo when I run decisionGen.R I get the following:

source("decisionGen.R")
Error in quantile.default(v[2, (cols + 1):(2 * cols)], shThresh, na.rm = TRUE) :
'probs' outside [0,1]

I was running Rscipt plan.R

Requesting sample of DATA.

Can someone please post a sample of a DATA zoo object? I am using Tiingo to get stock data information and having issues to unlist the stocks. Because Yahoo API is not working any longer, I have issues replicating.

Any sample of a couple of stocks will work.

Thanks,

Alternative to Yahoo YQL

@chrisconlan

As Yahoo YQL is not working. It is possible to get some data from Quandl

Can somebody put some samples on how data downloaded from yahoo looks like or how will DATA frame should be looking at the end? Quandl has many ways to download data, one is with zoo package. So I am working on the code if it is useful for someone.

How to create Labels of Chapter 1

Can someone please guide me how to create legends like the ones on chapter 1? Seems like they are in two columns. Below the example from the book, my code and my result.

image

plot(y = Et, x = t, type = "l", col = 1, xlab = "Time", ylab = "Equity ($)", main = "Figure 1.3: Randomly Generated Equity Curves")
grid()
abline(h = 10000)
lines(y = Et2, x = t, col = 2)
lines(y = Eb, x = t, col = 8)
legend(x = "topleft", col = c(1, 2, 8), lty = c(1, 1), lwd = 2, ncol = 2, title = "NPMD   Burke",
    cex = 0.5,
    legend = c(
            paste0(round(NPMD_Et, 2)),
            paste0(round(NPMD_Et2, 2)),
            paste0(round(NPMD_Eb, 2)),
            paste0(round(Burke_Et, 2)),
            paste0(round(Burke_Et2,2)),
            paste0(round(Burke_Eb, 2))

            ))

I am getting the following output:

screen shot 2017-10-05 at 8 03 25 am

2-6 listing with quandl.R

We need to modify 2-6 script and replace yahoo.R with quandl.R
What does this code exactly tries to do?

if(!weekend & !span){
      c <- as.numeric(substr(maxdate, start = 1, stop = 4))
      a <- as.numeric(substr(maxdate, start = 6, stop = 7)) - 1
      b <- as.numeric(substr(maxdate, start = 9, stop = 10))
      df <- yahoo(i, a = a, b = b, c = c)
      if(!is.null(df)){
        if(all(!is.na(df)) & nrow(df) > 0){
          df <- df[nrow(df):1]
          write.table(df, file = paste0(i, ".csv"), sep = ",",

We can add start and end dates to quandl_get function in Platform/functions/quandl.R as per below format from quandl.
data <- Quandl("FRED/GDP", start_date="2001-12-31", end_date="2005-12-31")

Do we need this?
Do we need start_date and end_date? or only start_date?

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.