Code Monkey home page Code Monkey logo

marketdata.jl's People

Contributors

arkoniak avatar dwinrow avatar femtotrader avatar github-actions[bot] avatar iblislin avatar milktrader 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  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  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

marketdata.jl's Issues

Create variety of datetime data

With the purpose of testing the ability of parsers to figure out the correct value.

  • decide on naming convention for different data
  • rename seconds_data
  • include only one column of data

Intraday sample data

Some intraday sample data (with 1 minute, 5 minutes, 15 minutes or 30 minutes timeframe) will be nice.

Test remote data access

Hello,

We should add unit tests to test remote data access.

If a remote data access is broken we should depreciate it and document this.

Kind regards

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Support for multiple tickers / adding ticker to result

I often find myself doing something like

tickers = ["^FTSE", "^N225", "^DJI"]

result_df = DataFrame(yahoo(tickers[1]))
result_df = [fill(tickers[1], nrow(result_df)) first_ticker]

for t in tickers[2:end]
    new_df = DataFrame(yahoo(t))
    new_df = [fill(t, nrow(new_df) new_df]
    result_df = vcat(result_df, new_df)
end

Could something like this (this might not be the best way of doing it of course, just a quick hack) be implemented as a yahoo(tickers::Vector{Union{String, Symbol}}) method?

If not (and this could be a separate issue but I thought it would be a bit small) could we have a add_ticker kwarg that includes the ticker in the TimeArray that's being returned?

Move doc to Documenter

Hello

We should probably consider moving doc to Documenter like most Julia libraries

Kind regards

Unable to get Remote data source

julia> yahoo(:INTC)
ERROR: HTTP.Exceptions.StatusError(403, "GET", "/v7/finance/download/INTC?period1=34819200&period2=1706370811&interval=1d&events=history", HTTP.Messages.Response:
"""
HTTP/1.1 403 Forbidden
Date: Sat, 27 Jan 2024 07:53:36 GMT
Connection: close
Strict-Transport-Security: max-age=31536000
Server: ATS
Expect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Length: 3369
Content-Type: text/html

<title>Yahoo</title> <style> html { height: 100%; } body { background: #fafafc url(https://s.yimg.com/nn/img/sad-panda-201402200631.png) 50% 50%; background-size: cover; height: 100%; text-align: center; font: 300 16px "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif; } #message { text-align: left; font-weight: 400; color: #1A1A1A; } #message a { padding: 0 3px; } #container { position: absolute; top: 50%; left: 50%; padding: 0 30px; margin-right: -50%; transform: translate(-50%, -50%); max-width: 40em; _width: 40em; } #container img { width: 174px; height: auto; } #switcher a { font-weight: 400; } #switcher a.active { color: #000; text-decoration: none; cursor: default; } </style>


3369-byte body
""")
Stacktrace:
[1] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.ConnectionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ConnectionRequest.jl:144
[2] (::Base.var"#96#98"{…})(args::HTTP.Messages.Request; kwargs::@kwargs{…})
@ Base .\error.jl:308
[3] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@kwargs{…})
@ HTTP.RetryRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:75
[4] manageretries
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:30 [inlined]
[5] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@kwargs{…})
@ HTTP.CookieRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:42
[6] managecookies
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:19 [inlined]
[7] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@kwargs{…})
@ HTTP.HeadersRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:71
[8] defaultheaders
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:14 [inlined]
[9] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@kwargs{…})
@ HTTP.RedirectRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:25
[10] redirects
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:14 [inlined]
[11] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@kwargs{})
@ HTTP.MessageRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:35
[12] makerequest
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:24 [inlined]
[13] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::YahooOpt; headers::Nothing, body::Vector{…}, query::YahooOpt, kw::@kwargs{})
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:457
[14] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:455
[15] #request#20
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:315 [inlined]
[16] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt) (repeats 2 times)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:313 [inlined]
[17] get
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:518 [inlined]
[18] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:95
[19] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102 [inlined]
[20] yahoo(s::Symbol)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102
[21] top-level scope
@ REPL[7]:1

caused by: HTTP.Exceptions.StatusError(403, "GET", "/v7/finance/download/INTC?period1=34819200&period2=1706370811&interval=1d&events=history", HTTP.Messages.Response:
"""
HTTP/1.1 403 Forbidden
Date: Sat, 27 Jan 2024 07:53:36 GMT
Connection: close
Strict-Transport-Security: max-age=31536000
Server: ATS
Expect-CT: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Length: 3369
Content-Type: text/html

<title>Yahoo</title> <style> html { height: 100%; } body { background: #fafafc url(https://s.yimg.com/nn/img/sad-panda-201402200631.png) 50% 50%; background-size: cover; height: 100%; text-align: center; font: 300 16px "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif; } #message { text-align: left; font-weight: 400; color: #1A1A1A; } #message a { padding: 0 3px; } #container { position: absolute; top: 50%; left: 50%; padding: 0 30px; margin-right: -50%; transform: translate(-50%, -50%); max-width: 40em; _width: 40em; } #container img { width: 174px; height: auto; } #switcher a { font-weight: 400; } #switcher a.active { color: #000; text-decoration: none; cursor: default; } </style>


3369-byte body
""")
Stacktrace:
[1] (::HTTP.ExceptionRequest.var"#exceptions#2"{…})(stream::HTTP.Streams.Stream{…}; status_exception::Bool, timedout::Nothing, logerrors::Bool, logtag::Nothing,
kw::@kwargs{…})
@ HTTP.ExceptionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ExceptionRequest.jl:19
[2] exceptions
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ExceptionRequest.jl:13 [inlined]
[3] (::HTTP.TimeoutRequest.var"#timeouts#3"{…})(stream::HTTP.Streams.Stream{…}; readtimeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.TimeoutRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\TimeoutRequest.jl:18
[4] (::HTTP.ConnectionRequest.var"#connections#4"{…})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, connect_timeout::Int64, logerrors::Bool, logtag::Nothing, kw::@kwargs{…})
@ HTTP.ConnectionRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\ConnectionRequest.jl:120
[5] (::Base.var"#96#98"{…})(args::HTTP.Messages.Request; kwargs::@kwargs{…})
@ Base .\error.jl:308
[6] (::HTTP.RetryRequest.var"#manageretries#3"{…})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::@kwargs{…})
@ HTTP.RetryRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:75
[7] manageretries
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RetryRequest.jl:30 [inlined]
[8] (::HTTP.CookieRequest.var"#managecookies#4"{…})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::@kwargs{…})
@ HTTP.CookieRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:42
[9] managecookies
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\CookieRequest.jl:19 [inlined]
[10] (::HTTP.HeadersRequest.var"#defaultheaders#2"{…})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, basicauth::Bool, detect_content_type::Bool, canonicalize_headers::Bool, kw::@kwargs{…})
@ HTTP.HeadersRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:71
[11] defaultheaders
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\HeadersRequest.jl:14 [inlined]
[12] (::HTTP.RedirectRequest.var"#redirects#3"{…})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::@kwargs{…})
@ HTTP.RedirectRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:25
[13] redirects
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\RedirectRequest.jl:14 [inlined]
[14] (::HTTP.MessageRequest.var"#makerequest#3"{…})(method::String, url::URIs.URI, headers::Nothing, body::Vector{…}; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, verbose::Int64, kw::@kwargs{})
@ HTTP.MessageRequest C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:35
[15] makerequest
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\clientlayers\MessageRequest.jl:24 [inlined]
[16] request(stack::HTTP.MessageRequest.var"#makerequest#3"{…}, method::String, url::String, h::Nothing, b::Vector{…}, q::YahooOpt; headers::Nothing, body::Vector{…}, query::YahooOpt, kw::@kwargs{})
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:457
[17] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:455
[18] #request#20
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:315 [inlined]
[19] request(stack::Function, method::String, url::String, h::Nothing, b::Vector{UInt8}, q::YahooOpt) (repeats 2 times)
@ HTTP C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:313 [inlined]
[20] get
@ C:\Users\Admin.julia\packages\HTTP\bDoga\src\HTTP.jl:518 [inlined]
[21] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:95
[22] yahoo(sym::String, opt::YahooOpt)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102 [inlined]
[23] yahoo(s::Symbol)
@ MarketData C:\Users\Admin.julia\packages\MarketData\Imzq1\src\downloads.jl:102
[24] top-level scope
@ REPL[7]:1
Some type information was truncated. Use show(err) to see complete types.

Closewrite not defined

Hi all,

I hadn't had any issues with MarketData on VSCode until yesterday and this error persists, it also fails 3 tests, FRED, Yahoo and ons, particularly stumped on this one, apologies if it is a stupid question but how do I fix this?

Thanks in advance,
Screenshot 2023-03-03 at 18 54 53

Contributing to JuliaQuant

@iblis17 @milktrader @StefanKarpinski I want to work on JuliaQuant and contribute to its developement...
I am new to OSS contributions but I have contributed to Bokeh in documentation related issues,jupyter notebook tutorials improvement(Which I believe notebook tutorials should be there for JuliaFin too,I believe there are no tutorials yet) and theme inclusion...I am mainly interested in contributing to documentation and learning a thing or two about quantitative finance regularly and then in future contribute to it...I am not sure if opening a issue was the right thing to do,but I am not aware of a gitter room...
pls guide..
I believe there are documentation available for these repos,but no general site has been worked on,So I would like to work on it and create and accumulate literature and and make a proper organization website..

Proposal to add `sink` feature to data downloaders

I've been playing with yahoo data source and one thing occurs to me: in its current implementation user is locked in TimeArray. It's not always convenient, user may prefer to work with other data formats, DataFrames, Temporal or maybe some other custom format. What I am proposing is to give an interface like this:

data = yahoo("SPY", <SINK>)
# for example
data = yahoo("SPY", DataFrame) # download data and export it to DataFrame
data = yahoo("SPY", Temportal)   # download data and export it to Temporal
...

Now, SINK can be anything: DataFrame, TimeArray or whatever user want. We can emit by default TimeArray for example, but that wouldn't limit user.

In order to do that we can wrap CSV.File in special structure which should conform Tables.jl protocol. The idea that if we for example define yahoo as

function yahoo(sym::AbstractString = "^GSPC", opt::YahooOpt = YahooOpt(), sink = DataFrame)
    host = rand(["query1", "query2"])
    url  = "https://$host.finance.yahoo.com/v7/finance/download/$sym"
    res  = HTTP.get(url, query = opt)
    @assert res.status == 200
    csv = CSV.File(res.body, missingstrings = ["null"])
    return sink(csv)
end

then this function is providing a DataFrame sink by default. In order for it to work for the TimeArray, one should only implement csv -> TimeArray interface which can look like

function TimeArray(csv)
    sch = TimeSeries.Tables.schema(csv)
    TimeArray(csv, timestamp = first(sch.names)) |> cleanup_colname!
end

and something similar for Temporal.

The problem with this direct approach is that it is very non-general. If in some other data source datetime column wouldn't be located at the first position it will break. So, we can do something smarter, like defining a structure

struct TimeDataWrapper{T1, T2}
   meta::T1
   data::T2
end

and use it

  sch = (; schema = TimeSeries.Tables.schema(csv), timestamp = 1) # or something similar
  timedatawrapper = TimeDataWrapper(sch, csv)
  return sink(timedatawrapper)

This structure should implement corresponding Tables.jl methods and at the same time should provide the necessary information in meta field (like where datetime column is located). So, every sink which can use this structure can convert data source to its own format without any problems.

We can do it in a few small steps

  1. make this change in MarketData.jl. As long as TimeDataWrapper lives inside MarketData.jl, functions like TimeArray(x::TimeDataWrapper) is not a type piracy. As a result, we get the function that can extract its data to TimeArray and DataFrame formats. Just to clarify, DataFrame support is coming from the fact that TimeDataWrapper follows Tables.jl API.
  2. Extract this functionality to a separate lightweight package MarketDataInterface.jl and ask the owner of TimeSeries.jl to provide support for this package.
  3. We can try to work with the owner of Temporal.jl and ask him to provide support.
  4. I am currently reviving Timestamps.jl and can write necessary support for them as well.

As a result, we will have a generic method, which can work with multiple sinks, and instead of forcing users what package to choose for financial data, they will be able to use a single package for data sourcing and any package they like for further data processing. It's a win-win situation.

As a further step, Quandl.jl can be revived and it can go through the same procedure. So we will have multiple financial data sources with the same consistent logic.

If this proposal is ok, I can try to go with the first step and we will see how it works out.

Helper methods to extract specific columns of MarketData sets

Here is the output for AAPL

julia> AAPL
8336x12 TimeSeries.TimeArray{Float64,2,Date,Array{Float64,2}} 1980-12-12 to 2013-12-31

             Open      High      Low       Close     Volume          Ex-Dividend  Split Ratio  Adj. Open  Adj. High  Adj. Low  Adj. Close  Adj. Volume     
1980-12-12 | 28.75     28.88     28.75     28.75     2093900         0.0          1            3.3766     3.3919     3.3766    3.3766      16751200        
1980-12-15 | 27.38     27.38     27.25     27.25     785200          0.0          1            3.2157     3.2157     3.2004    3.2004      6281600         
1980-12-16 | 25.38     25.38     25.25     25.25     472000          0.0          1            2.9808     2.9808     2.9655    2.9655      3776000         
1980-12-17 | 25.88     26.0      25.88     25.88     385900          0.0          1            3.0395     3.0536     3.0395    3.0395      3087200         

2013-12-26 | 568.1     569.5     563.38    563.9     7286000         0.0          1            564.7392   566.1309   560.0471  560.564     7286000         
2013-12-27 | 563.82    564.41    559.5     560.09    8067300         0.0          1            560.4845   561.071    556.1901  556.7766    8067300         
2013-12-30 | 557.46    560.09    552.32    554.52    9058200         0.0          1            554.1621   556.7766   549.0525  551.2395    9058200         
2013-12-31 | 554.17    561.28    554.0     561.02    7967300         0.0          1            550.8916   557.9595   550.7226  557.7011    7967300         

Many times, researchers might only want a couple of the columns to work with, and might do something like this

julia> AAPL["Open", "Close", "Volume"]
8336x3 TimeSeries.TimeArray{Float64,2,Date,Array{Float64,2}} 1980-12-12 to 2013-12-31

             Open      Close     Volume          
1980-12-12 | 28.75     28.75     2093900         
1980-12-15 | 27.38     27.25     785200          
1980-12-16 | 25.38     25.25     472000          
1980-12-17 | 25.88     25.88     385900          

2013-12-26 | 568.1     563.9     7286000         
2013-12-27 | 563.82    560.09    8067300         
2013-12-30 | 557.46    554.52    9058200         
2013-12-31 | 554.17    561.02    7967300         

A method to extract specific columns would look like this

julia> ocv(AAPL)
8336x3 TimeSeries.TimeArray{Float64,2,Date,Array{Float64,2}} 1980-12-12 to 2013-12-31

             Open      Close     Volume          
1980-12-12 | 28.75     28.75     2093900         
1980-12-15 | 27.38     27.25     785200          
1980-12-16 | 25.38     25.25     472000          
1980-12-17 | 25.88     25.88     385900          

2013-12-26 | 568.1     563.9     7286000         
2013-12-27 | 563.82    560.09    8067300         
2013-12-30 | 557.46    554.52    9058200         
2013-12-31 | 554.17    561.02    7967300   

Very nice ,

Congrats, nice packages !
Wher is list and data.scv files of all marketes ?
How to import all data from market ? More then 3: AAPL,BA, CAT ...
Paul

[PackageEvaluator.jl] Your package MarketData may have a testing issue.

This issue is being filed by a script, but if you reply, I will see it.

PackageEvaluator.jl is a script that runs nightly.
It attempts to load all Julia packages and run their test (if available) on both the stable version
of Julia (0.2) and the nightly build of the unstable version (0.3).

The results of this script are used to generate a package listing
enhanced with testing results.

The status of this package, MarketData, on...

  • Julia 0.2 is 'Package was untestable.' PackageEvaluator.jl
  • Julia 0.3 is 'No tests, but package loads.' PackageEvaluator.jl

No tests, but package loads. can be due to their being no tests (you should write some if you can!)
but can also be due to PackageEvaluator not being able to find your tests.
Consider adding a test/runtests.jl file.

Package doesn't load. is the worst-case scenario. Sometimes this arises because your package
doesn't have BinDeps support, or needs something that can't be installed with BinDeps. If this
is the case for your package, please file an issue
and an exception can be made so your package will not be tested.

This automatically filed issue is a one-off message. Starting soon, issues will only be
filed when the testing status of your package changes in a negative direction (gets worse).
If you'd like to opt-out of these status-change messages, reply to this message.

extracting data with Symbol IUSA.DE (germany)

I want to extract data from a stock exchange in Germany but the Symbol always gets an error due to the DE at the end.
From this stock, I want to extract the data: https://finance.yahoo.com/quote/IUSA.DE?p=IUSA.DE&.tsrc=fin-srch
My code looks like this:

using MarketData 
ETF_SP500 = yahoo(:IUSA.DE) 

This is the error I get

LoadError: type Symbol has no field DE
Stacktrace:
 [1] getproperty(x::Symbol, f::Symbol)
   @ Base .\Base.jl:42
 [2] top-level scope
   @ c:\Users\ignac\Documents\GitHub\pecon\coding\portfolio.jl:48
in expression starting at c:\Users\ignac\Documents\GitHub\pecon\coding\portfolio.jl:48

Is there a workaround?

Thanks in advance.

Add testing job

It turns out that there is no test job in github workflows. We should add one for proper CI.

Date method not found

julia> using MarketData
ERROR: Date not defined
 in include at ./boot.jl:245
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51
while loading /Users/Administrator/.julia/v0.3/MarketData/src/MarketData.jl, in expression starting on line 17

Extra Import in the src file?

In the src/MarketData.jl file, is the line: using Base.Dates, TimeSeries in Line 3 an extra import, or does it hold any significance?

Deprecation warnings

Upon running yahoo(:AAPL) command I get the following warning:

┌ Warning: `missingstrings` keyword argument is deprecated; pass a `Vector{String}` to `missings
tring` instead
└ @ CSV ~/.julia/packages/CSV/0Elut/src/context.jl:266

cannot load package

ERROR: syntax: expected assignment after "const"
 in include at ./boot.jl:244
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:244
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:54
 in include at ./boot.jl:244
 in include_from_node1 at ./loading.jl:128
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51
while loading /Users/Bill/.julia/v0.3/Dates/src/query.jl, in expression starting on line 25
while loading /Users/Bill/.julia/v0.3/Dates/src/Dates.jl, in expression starting on line 6
while loading /Users/Bill/.julia/v0.3/MarketData/src/MarketData.jl, in expression starting on line 3

Rename columns difficult to get with Symbol column indexing

Some columns such as Adj. Close could be difficult to get using Symbol column indexing

maybe we should rename them (not in data csv file, but with Julia code)

A dict for replace could help here

Dict(
    Symbol("Adj. Close") => :AdjClose,
    Symbol("Ex-Dividend") => :ExDividend,
    Symbol("Split Ratio") => :SplitRatio,
    Symbol("Adj. Open") => :AdjOpen,
    Symbol("Adj. High") => :AdjHigh,
    Symbol("Adj. Low") => :AdjLow,
    Symbol("Adj. Close") => :AdjClose,
    Symbol("Adj. Volume") => :AdjVolume
)

but a function to cleanup automatically columns could also be part of https://github.com/JuliaStats/TimeSeries.jl

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.