udacity / artificial-intelligence-for-trading Goto Github PK
View Code? Open in Web Editor NEWContent for Udacity's AI in Trading NanoDegree.
Home Page: https://www.udacity.com/course/nd880
Content for Udacity's AI in Trading NanoDegree.
Home Page: https://www.udacity.com/course/nd880
In project 5 cosine_similarities_df_dict throws a "KeyError: 'negative' " because there has been new 10-K's added to the SEC website since the project was originally created. There is a fix on the knowledge hub that removes the 2018 10-K's but thought I would post this here and see if there is a better fix that allows updated 10-K's to be included.
Thread from the knowledge with more information: https://knowledge.udacity.com/questions/27696
When I try to download 10-k document in Project5, it seems that the website block such behavior and I can't successfully get the raw_fillings_by_ticker variable.
`raw_fillings_by_ticker = {}
for ticker, data in sec_data.items():
raw_fillings_by_ticker[ticker] = {}
for index_url, file_type, file_date in tqdm(data, desc='Downloading {} Fillings'.format(ticker), unit='filling'):
if (file_type == '10-K'):
file_url = index_url.replace('-index.htm', '.txt').replace('.txtl', '.txt')
raw_fillings_by_ticker[ticker][file_date] = sec_api.get(file_url)`
The codeblock just before Computer Log Returns is not working. The error is shown below:
python monthly_close = resample_prices(close) project_helper.plot_resampled_prices( monthly_close.loc[:, apple_ticker], close.loc[:, apple_ticker], '{} Stock - Close Vs Monthly Close'.format(apple_ticker))
ValueError Traceback (most recent call last)
in
3 monthly_close.loc[:, apple_ticker],
4 close.loc[:, apple_ticker],
----> 5 '{} Stock - Close Vs Monthly Close'.format(apple_ticker))
~\Desktop\Udacity-AI-for-Trading\project\project_1\project_helper.py in plot_resampled_prices(df_resampled, df, title)
71 traces = _generate_traces([
72 ('Monthly Close', df_resampled, helper.color_scheme['major_line']),
---> 73 ('Close', df, helper.color_scheme['minor_line'])])
74
75 offline_py.iplot({'data': traces, 'layout': layout}, config=config)
~\Desktop\Udacity-AI-for-Trading\project\project_1\project_helper.py in _generate_traces(name_df_color_data)
22 y=df,
23 mode='line',
---> 24 line={'color': color}))
25
26 return traces
~\Anaconda3\lib\site-packages\plotly\graph_objs_scatter.py in init(self, arg, cliponaxis, connectgaps, customdata, customdatasrc, dx, dy, error_x, error_y, fill, fillcolor, groupnorm, hoverinfo, hoverinfosrc, hoverlabel, hoveron, hovertemplate, hovertemplatesrc, hovertext, hovertextsrc, ids, idssrc, legendgroup, line, marker, meta, metasrc, mode, name, opacity, orientation, r, rsrc, selected, selectedpoints, showlegend, stackgaps, stackgroup, stream, t, text, textfont, textposition, textpositionsrc, textsrc, texttemplate, texttemplatesrc, tsrc, uid, uirevision, unselected, visible, x, x0, xaxis, xcalendar, xsrc, y, y0, yaxis, ycalendar, ysrc, **kwargs)
2816 _v = mode if mode is not None else _v
2817 if _v is not None:
-> 2818 self["mode"] = _v
2819 _v = arg.pop("name", None)
2820 _v = name if name is not None else _v
~\Anaconda3\lib\site-packages\plotly\basedatatypes.py in setitem(self, prop, value)
3961 # ### Handle simple property ###
3962 else:
-> 3963 self._set_prop(prop, value)
3964 else:
3965 # Make sure properties dict is initialized
~\Anaconda3\lib\site-packages\plotly\basedatatypes.py in _set_prop(self, prop, val)
4279 return
4280 else:
-> 4281 raise err
4282
4283 # val is None
~\Anaconda3\lib\site-packages\plotly\basedatatypes.py in _set_prop(self, prop, val)
4274
4275 try:
-> 4276 val = validator.validate_coerce(val)
4277 except ValueError as err:
4278 if self._skip_invalid:
~\Anaconda3\lib\site-packages_plotly_utils\basevalidators.py in validate_coerce(self, v)
1867 validated_v = self.vc_scalar(v)
1868 if validated_v is None:
-> 1869 self.raise_invalid_val(v)
1870
1871 v = validated_v
~\Anaconda3\lib\site-packages_plotly_utils\basevalidators.py in raise_invalid_val(self, v, inds)
283 typ=type_str(v),
284 v=repr(v),
--> 285 valid_clr_desc=self.description(),
286 )
287 )
ValueError:
Invalid value of type 'builtins.str' received for the 'mode' property of scatter
Received value: 'line'
The 'mode' property is a flaglist and may be specified
as a string containing:
- Any combination of ['lines', 'markers', 'text'] joined with '+' characters
(e.g. 'lines+markers')
OR exactly one of ['none'] (e.g. 'none')
Taking AI for Trading. This notebook does not even get past the first import cell. Change numpy to 1.14.5 get down to the alphaens block and it fails again.
I can't seem to view Project 6 online or pull the code. Is this an issue with github or the actual ipynb? I have the same issue with the Project 6 notebook on Udacity taking a long time to load or not loading at all.
Hi, Couldn't run downloaded project on your local computer? I tried it on latest version of Mac/Windows/Ubuntu but libraries in requirements.txt are not installing. Any suggestions to setup local computer for project execution please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.