quantmod icon indicating copy to clipboard operation
quantmod copied to clipboard

Modify getSymbols.SQLite

Open KuiMing opened this issue 9 years ago • 3 comments

  1. Comment out setting of column names because Data are not just "OHLC".
  2. Order by first element of "db.fields".

KuiMing avatar Dec 13 '15 05:12 KuiMing

I think you're going to need to describe your rationale for the change to order_by. The data pulled ultimately needs to be converted to xts, so some standardization is required on the order_by data.

As for column names, I agree with the spirit that not all data is OHLCVA. I would suggest naming the columns for the columns in the SQLite data to start. Then, we could test for OHLC, BBO, etc using other functional already in quantmod for that purpose. Simply eliminating column name setting entirely doesn't seem like a general solution.

braverock avatar Dec 13 '15 11:12 braverock

  1. Currently conflicts with issue #51, and will not be merged until it is consistent with the solutions proposed in that issue: i.e. simply not setting colnames isn't going to be merged, because it conflicts with intended functionality. Also, getSymbols.MySQL should be fixed too.
  2. This bug is described in #21, and also needs to be fixed in getSymbols.MySQL (maybe others).

joshuaulrich avatar Dec 13 '15 17:12 joshuaulrich

  1. Data can be ordered by a new argument: "Date_col" that is the column name of date in database.

  2. Pseudo code:

    if there is col.names,
       colnames of output = col.names.
    else there is only df.fields, 
       colnames of output = df.fields without the column name of date.
    

KuiMing avatar Dec 14 '15 09:12 KuiMing