From 43c01cec8cf80181fd3209449097e82cf4dbf00e Mon Sep 17 00:00:00 2001 From: David Jiang Date: Thu, 29 Sep 2016 10:10:13 -0700 Subject: [PATCH 01/21] routes templates and controllers setup --- AAPL.json | 2601 ++++++++++++++++++++++++++++++++ index.html | 47 + js/app.js | 40 + js/controllers/mainCtrl.js | 6 + js/templates/dateSlider.html | 1 + js/templates/mainContent.html | 1 + js/templates/portfolio.html | 1 + js/templates/stocksTicker.html | 1 + js/templates/trade.html | 1 + js/templates/transactions.html | 1 + 10 files changed, 2700 insertions(+) create mode 100644 AAPL.json create mode 100644 index.html create mode 100644 js/app.js create mode 100644 js/controllers/mainCtrl.js create mode 100644 js/templates/dateSlider.html create mode 100644 js/templates/mainContent.html create mode 100644 js/templates/portfolio.html create mode 100644 js/templates/stocksTicker.html create mode 100644 js/templates/trade.html create mode 100644 js/templates/transactions.html diff --git a/AAPL.json b/AAPL.json new file mode 100644 index 0000000..a0ab395 --- /dev/null +++ b/AAPL.json @@ -0,0 +1,2601 @@ +{ +query: { +count: 252, +created: "2016-09-29T16:25:29Z", +lang: "en-US", +diagnostics: { +url: [ +{ +execution-start-time: "1", +execution-stop-time: "2", +execution-time: "1", +proxy: "DEFAULT", +content: "http://www.datatables.org/yahoo/finance/yahoo.finance.historicaldata.xml" +}, +{ +execution-start-time: "6", +execution-stop-time: "22", +execution-time: "16", +proxy: "DEFAULT", +content: "http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL" +}, +{ +execution-start-time: "27", +execution-stop-time: "29", +execution-time: "2", +proxy: "DEFAULT", +content: "http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL" +} +], +publiclyCallable: "true", +cache: [ +{ +execution-start-time: "5", +execution-stop-time: "6", +execution-time: "1", +method: "GET", +type: "MEMCACHED", +content: "f756d73c9b6c7b01a1d7f9c2ff5f9809" +}, +{ +execution-start-time: "26", +execution-stop-time: "26", +execution-time: "0", +method: "GET", +type: "MEMCACHED", +content: "230584bed0cbcab0d8e6f863db02c098" +} +], +query: [ +{ +execution-start-time: "6", +execution-stop-time: "25", +execution-time: "19", +params: "{url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}", +content: "select * from csv(0,1) where url=@url" +}, +{ +execution-start-time: "26", +execution-stop-time: "32", +execution-time: "6", +params: "{columnsNames=[Date,Open,High,Low,Close,Volume,Adj_Close], url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}", +content: "select * from csv(2,0) where url=@url and columns=@columnsNames" +} +], +javascript: { +execution-start-time: "3", +execution-stop-time: "968", +execution-time: "964", +instructions-used: "24196224", +table-name: "yahoo.finance.historicaldata" +}, +user-time: "974", +service-time: "20", +build-version: "0.2.54" +}, +results: { +quote: [ +{ +Symbol: "AAPL", +Date: "2014-12-31", +Open: "112.82", +High: "113.129997", +Low: "110.209999", +Close: "110.379997", +Volume: "41403400", +Adj_Close: "106.71374" +}, +{ +Symbol: "AAPL", +Date: "2014-12-30", +Open: "113.639999", +High: "113.919998", +Low: "112.110001", +Close: "112.519997", +Volume: "29881500", +Adj_Close: "108.78266" +}, +{ +Symbol: "AAPL", +Date: "2014-12-29", +Open: "113.790001", +High: "114.769997", +Low: "113.699997", +Close: "113.910004", +Volume: "27598900", +Adj_Close: "110.126498" +}, +{ +Symbol: "AAPL", +Date: "2014-12-26", +Open: "112.099998", +High: "114.519997", +Low: "112.010002", +Close: "113.989998", +Volume: "33721000", +Adj_Close: "110.203835" +}, +{ +Symbol: "AAPL", +Date: "2014-12-24", +Open: "112.580002", +High: "112.709999", +Low: "112.010002", +Close: "112.010002", +Volume: "14479600", +Adj_Close: "108.289605" +}, +{ +Symbol: "AAPL", +Date: "2014-12-23", +Open: "113.230003", +High: "113.330002", +Low: "112.459999", +Close: "112.540001", +Volume: "26028400", +Adj_Close: "108.802" +}, +{ +Symbol: "AAPL", +Date: "2014-12-22", +Open: "112.160004", +High: "113.489998", +Low: "111.970001", +Close: "112.940002", +Volume: "45167500", +Adj_Close: "109.188715" +}, +{ +Symbol: "AAPL", +Date: "2014-12-19", +Open: "112.260002", +High: "113.239998", +Low: "111.660004", +Close: "111.779999", +Volume: "88429800", +Adj_Close: "108.067241" +}, +{ +Symbol: "AAPL", +Date: "2014-12-18", +Open: "111.870003", +High: "112.650002", +Low: "110.660004", +Close: "112.650002", +Volume: "59006200", +Adj_Close: "108.908347" +}, +{ +Symbol: "AAPL", +Date: "2014-12-17", +Open: "107.120003", +High: "109.839996", +Low: "106.82", +Close: "109.410004", +Volume: "53411800", +Adj_Close: "105.775965" +}, +{ +Symbol: "AAPL", +Date: "2014-12-16", +Open: "106.370003", +High: "110.160004", +Low: "106.260002", +Close: "106.75", +Volume: "60790700", +Adj_Close: "103.204313" +}, +{ +Symbol: "AAPL", +Date: "2014-12-15", +Open: "110.699997", +High: "111.599998", +Low: "106.349998", +Close: "108.230003", +Volume: "67218100", +Adj_Close: "104.635158" +}, +{ +Symbol: "AAPL", +Date: "2014-12-12", +Open: "110.459999", +High: "111.870003", +Low: "109.580002", +Close: "109.730003", +Volume: "56028100", +Adj_Close: "106.085336" +}, +{ +Symbol: "AAPL", +Date: "2014-12-11", +Open: "112.260002", +High: "113.800003", +Low: "111.339996", +Close: "111.620003", +Volume: "41401700", +Adj_Close: "107.912559" +}, +{ +Symbol: "AAPL", +Date: "2014-12-10", +Open: "114.410004", +High: "114.849998", +Low: "111.540001", +Close: "111.949997", +Volume: "44565300", +Adj_Close: "108.231593" +}, +{ +Symbol: "AAPL", +Date: "2014-12-09", +Open: "110.190002", +High: "114.300003", +Low: "109.349998", +Close: "114.120003", +Volume: "60208000", +Adj_Close: "110.329522" +}, +{ +Symbol: "AAPL", +Date: "2014-12-08", +Open: "114.099998", +High: "114.650002", +Low: "111.620003", +Close: "112.400002", +Volume: "57664900", +Adj_Close: "108.66665" +}, +{ +Symbol: "AAPL", +Date: "2014-12-05", +Open: "115.989998", +High: "116.080002", +Low: "114.639999", +Close: "115.00", +Volume: "38318900", +Adj_Close: "111.18029" +}, +{ +Symbol: "AAPL", +Date: "2014-12-04", +Open: "115.769997", +High: "117.199997", +Low: "115.290001", +Close: "115.489998", +Volume: "42044500", +Adj_Close: "111.654013" +}, +{ +Symbol: "AAPL", +Date: "2014-12-03", +Open: "115.75", +High: "116.349998", +Low: "115.110001", +Close: "115.93", +Volume: "43063400", +Adj_Close: "112.079401" +}, +{ +Symbol: "AAPL", +Date: "2014-12-02", +Open: "113.50", +High: "115.75", +Low: "112.75", +Close: "114.629997", +Volume: "59348900", +Adj_Close: "110.822577" +}, +{ +Symbol: "AAPL", +Date: "2014-12-01", +Open: "118.809998", +High: "119.25", +Low: "111.269997", +Close: "115.07", +Volume: "83814000", +Adj_Close: "111.247965" +}, +{ +Symbol: "AAPL", +Date: "2014-11-28", +Open: "119.269997", +High: "119.400002", +Low: "118.050003", +Close: "118.93", +Volume: "24814400", +Adj_Close: "114.979756" +}, +{ +Symbol: "AAPL", +Date: "2014-11-26", +Open: "117.940002", +High: "119.099998", +Low: "117.830002", +Close: "119.00", +Volume: "40768300", +Adj_Close: "115.047431" +}, +{ +Symbol: "AAPL", +Date: "2014-11-25", +Open: "119.07", +High: "119.75", +Low: "117.449997", +Close: "117.599998", +Volume: "68840400", +Adj_Close: "113.69393" +}, +{ +Symbol: "AAPL", +Date: "2014-11-24", +Open: "116.849998", +High: "118.769997", +Low: "116.620003", +Close: "118.629997", +Volume: "47450800", +Adj_Close: "114.689718" +}, +{ +Symbol: "AAPL", +Date: "2014-11-21", +Open: "117.510002", +High: "117.57", +Low: "116.029999", +Close: "116.470001", +Volume: "57179300", +Adj_Close: "112.601466" +}, +{ +Symbol: "AAPL", +Date: "2014-11-20", +Open: "114.910004", +High: "116.860001", +Low: "114.849998", +Close: "116.309998", +Volume: "43395500", +Adj_Close: "112.446776" +}, +{ +Symbol: "AAPL", +Date: "2014-11-19", +Open: "115.440002", +High: "115.739998", +Low: "113.800003", +Close: "114.669998", +Volume: "41869200", +Adj_Close: "110.861249" +}, +{ +Symbol: "AAPL", +Date: "2014-11-18", +Open: "113.940002", +High: "115.690002", +Low: "113.889999", +Close: "115.470001", +Volume: "44224000", +Adj_Close: "111.63468" +}, +{ +Symbol: "AAPL", +Date: "2014-11-17", +Open: "114.269997", +High: "117.279999", +Low: "113.300003", +Close: "113.989998", +Volume: "46746700", +Adj_Close: "110.203835" +}, +{ +Symbol: "AAPL", +Date: "2014-11-14", +Open: "113.150002", +High: "114.190002", +Low: "111.209999", +Close: "114.18", +Volume: "44063600", +Adj_Close: "110.387527" +}, +{ +Symbol: "AAPL", +Date: "2014-11-13", +Open: "111.800003", +High: "113.449997", +Low: "111.599998", +Close: "112.82", +Volume: "59522900", +Adj_Close: "109.072698" +}, +{ +Symbol: "AAPL", +Date: "2014-11-12", +Open: "109.379997", +High: "111.43", +Low: "109.370003", +Close: "111.25", +Volume: "46942400", +Adj_Close: "107.554846" +}, +{ +Symbol: "AAPL", +Date: "2014-11-11", +Open: "108.699997", +High: "109.75", +Low: "108.400002", +Close: "109.699997", +Volume: "27442300", +Adj_Close: "106.056326" +}, +{ +Symbol: "AAPL", +Date: "2014-11-10", +Open: "109.019997", +High: "109.330002", +Low: "108.669998", +Close: "108.830002", +Volume: "27195500", +Adj_Close: "105.215228" +}, +{ +Symbol: "AAPL", +Date: "2014-11-07", +Open: "108.75", +High: "109.32", +Low: "108.550003", +Close: "109.010002", +Volume: "33691500", +Adj_Close: "105.389249" +}, +{ +Symbol: "AAPL", +Date: "2014-11-06", +Open: "108.599998", +High: "108.790001", +Low: "107.800003", +Close: "108.699997", +Volume: "34968500", +Adj_Close: "105.089541" +}, +{ +Symbol: "AAPL", +Date: "2014-11-05", +Open: "109.099998", +High: "109.300003", +Low: "108.129997", +Close: "108.860001", +Volume: "37435900", +Adj_Close: "104.789843" +}, +{ +Symbol: "AAPL", +Date: "2014-11-04", +Open: "109.360001", +High: "109.489998", +Low: "107.720001", +Close: "108.599998", +Volume: "41574400", +Adj_Close: "104.539562" +}, +{ +Symbol: "AAPL", +Date: "2014-11-03", +Open: "108.220001", +High: "110.300003", +Low: "108.010002", +Close: "109.400002", +Volume: "52282600", +Adj_Close: "105.309654" +}, +{ +Symbol: "AAPL", +Date: "2014-10-31", +Open: "108.010002", +High: "108.040001", +Low: "107.209999", +Close: "108.00", +Volume: "44639300", +Adj_Close: "103.961997" +}, +{ +Symbol: "AAPL", +Date: "2014-10-30", +Open: "106.959999", +High: "107.349998", +Low: "105.900002", +Close: "106.980003", +Volume: "40654800", +Adj_Close: "102.980136" +}, +{ +Symbol: "AAPL", +Date: "2014-10-29", +Open: "106.650002", +High: "107.370003", +Low: "106.360001", +Close: "107.339996", +Volume: "52687900", +Adj_Close: "103.32667" +}, +{ +Symbol: "AAPL", +Date: "2014-10-28", +Open: "105.400002", +High: "106.739998", +Low: "105.349998", +Close: "106.739998", +Volume: "48060900", +Adj_Close: "102.749105" +}, +{ +Symbol: "AAPL", +Date: "2014-10-27", +Open: "104.849998", +High: "105.480003", +Low: "104.699997", +Close: "105.110001", +Volume: "34187700", +Adj_Close: "101.180051" +}, +{ +Symbol: "AAPL", +Date: "2014-10-24", +Open: "105.18", +High: "105.489998", +Low: "104.529999", +Close: "105.220001", +Volume: "47053900", +Adj_Close: "101.285939" +}, +{ +Symbol: "AAPL", +Date: "2014-10-23", +Open: "104.080002", +High: "105.050003", +Low: "103.629997", +Close: "104.830002", +Volume: "71074700", +Adj_Close: "100.910521" +}, +{ +Symbol: "AAPL", +Date: "2014-10-22", +Open: "102.839996", +High: "104.110001", +Low: "102.599998", +Close: "102.989998", +Volume: "68263100", +Adj_Close: "99.139313" +}, +{ +Symbol: "AAPL", +Date: "2014-10-21", +Open: "103.019997", +High: "103.019997", +Low: "101.269997", +Close: "102.470001", +Volume: "94623900", +Adj_Close: "98.638758" +}, +{ +Symbol: "AAPL", +Date: "2014-10-20", +Open: "98.32", +High: "99.959999", +Low: "98.220001", +Close: "99.760002", +Volume: "77517300", +Adj_Close: "96.030083" +}, +{ +Symbol: "AAPL", +Date: "2014-10-17", +Open: "97.50", +High: "99.00", +Low: "96.809998", +Close: "97.669998", +Volume: "68179700", +Adj_Close: "94.018222" +}, +{ +Symbol: "AAPL", +Date: "2014-10-16", +Open: "95.550003", +High: "97.720001", +Low: "95.410004", +Close: "96.260002", +Volume: "72154500", +Adj_Close: "92.660945" +}, +{ +Symbol: "AAPL", +Date: "2014-10-15", +Open: "97.970001", +High: "99.150002", +Low: "95.18", +Close: "97.540001", +Volume: "100933600", +Adj_Close: "93.893086" +}, +{ +Symbol: "AAPL", +Date: "2014-10-14", +Open: "100.389999", +High: "100.519997", +Low: "98.57", +Close: "98.75", +Volume: "63688600", +Adj_Close: "95.057844" +}, +{ +Symbol: "AAPL", +Date: "2014-10-13", +Open: "101.330002", +High: "101.779999", +Low: "99.809998", +Close: "99.809998", +Volume: "53583400", +Adj_Close: "96.078209" +}, +{ +Symbol: "AAPL", +Date: "2014-10-10", +Open: "100.690002", +High: "102.029999", +Low: "100.300003", +Close: "100.730003", +Volume: "66331600", +Adj_Close: "96.963817" +}, +{ +Symbol: "AAPL", +Date: "2014-10-09", +Open: "101.540001", +High: "102.379997", +Low: "100.610001", +Close: "101.019997", +Volume: "77376500", +Adj_Close: "97.242968" +}, +{ +Symbol: "AAPL", +Date: "2014-10-08", +Open: "98.760002", +High: "101.110001", +Low: "98.309998", +Close: "100.800003", +Volume: "57404700", +Adj_Close: "97.0312" +}, +{ +Symbol: "AAPL", +Date: "2014-10-07", +Open: "99.43", +High: "100.120003", +Low: "98.730003", +Close: "98.75", +Volume: "42094200", +Adj_Close: "95.057844" +}, +{ +Symbol: "AAPL", +Date: "2014-10-06", +Open: "99.949997", +High: "100.650002", +Low: "99.419998", +Close: "99.620003", +Volume: "37051200", +Adj_Close: "95.895318" +}, +{ +Symbol: "AAPL", +Date: "2014-10-03", +Open: "99.440002", +High: "100.209999", +Low: "99.040001", +Close: "99.620003", +Volume: "43469600", +Adj_Close: "95.895318" +}, +{ +Symbol: "AAPL", +Date: "2014-10-02", +Open: "99.269997", +High: "100.220001", +Low: "98.040001", +Close: "99.900002", +Volume: "47757800", +Adj_Close: "96.164848" +}, +{ +Symbol: "AAPL", +Date: "2014-10-01", +Open: "100.589996", +High: "100.690002", +Low: "98.699997", +Close: "99.18", +Volume: "51491300", +Adj_Close: "95.471767" +}, +{ +Symbol: "AAPL", +Date: "2014-09-30", +Open: "100.809998", +High: "101.540001", +Low: "100.529999", +Close: "100.75", +Volume: "55264100", +Adj_Close: "96.983066" +}, +{ +Symbol: "AAPL", +Date: "2014-09-29", +Open: "98.650002", +High: "100.440002", +Low: "98.629997", +Close: "100.110001", +Volume: "49766300", +Adj_Close: "96.366996" +}, +{ +Symbol: "AAPL", +Date: "2014-09-26", +Open: "98.529999", +High: "100.75", +Low: "98.400002", +Close: "100.75", +Volume: "62370500", +Adj_Close: "96.983066" +}, +{ +Symbol: "AAPL", +Date: "2014-09-25", +Open: "100.510002", +High: "100.709999", +Low: "97.720001", +Close: "97.870003", +Volume: "100092000", +Adj_Close: "94.210749" +}, +{ +Symbol: "AAPL", +Date: "2014-09-24", +Open: "102.160004", +High: "102.849998", +Low: "101.199997", +Close: "101.75", +Volume: "60171800", +Adj_Close: "97.945677" +}, +{ +Symbol: "AAPL", +Date: "2014-09-23", +Open: "100.599998", +High: "102.940002", +Low: "100.540001", +Close: "102.639999", +Volume: "63402200", +Adj_Close: "98.802401" +}, +{ +Symbol: "AAPL", +Date: "2014-09-22", +Open: "101.800003", +High: "102.139999", +Low: "100.580002", +Close: "101.059998", +Volume: "52788400", +Adj_Close: "97.281473" +}, +{ +Symbol: "AAPL", +Date: "2014-09-19", +Open: "102.290001", +High: "102.349998", +Low: "100.50", +Close: "100.959999", +Volume: "70902400", +Adj_Close: "97.185214" +}, +{ +Symbol: "AAPL", +Date: "2014-09-18", +Open: "101.93", +High: "102.349998", +Low: "101.559998", +Close: "101.790001", +Volume: "37299400", +Adj_Close: "97.984183" +}, +{ +Symbol: "AAPL", +Date: "2014-09-17", +Open: "101.269997", +High: "101.800003", +Low: "100.589996", +Close: "101.580002", +Volume: "60926500", +Adj_Close: "97.782035" +}, +{ +Symbol: "AAPL", +Date: "2014-09-16", +Open: "99.800003", +High: "101.260002", +Low: "98.889999", +Close: "100.860001", +Volume: "66908100", +Adj_Close: "97.088954" +}, +{ +Symbol: "AAPL", +Date: "2014-09-15", +Open: "102.809998", +High: "103.050003", +Low: "101.440002", +Close: "101.629997", +Volume: "61316500", +Adj_Close: "97.830161" +}, +{ +Symbol: "AAPL", +Date: "2014-09-12", +Open: "101.209999", +High: "102.190002", +Low: "101.080002", +Close: "101.660004", +Volume: "62626100", +Adj_Close: "97.859046" +}, +{ +Symbol: "AAPL", +Date: "2014-09-11", +Open: "100.410004", +High: "101.440002", +Low: "99.620003", +Close: "101.43", +Volume: "62353100", +Adj_Close: "97.637642" +}, +{ +Symbol: "AAPL", +Date: "2014-09-10", +Open: "98.010002", +High: "101.110001", +Low: "97.760002", +Close: "101.00", +Volume: "100869600", +Adj_Close: "97.223719" +}, +{ +Symbol: "AAPL", +Date: "2014-09-09", +Open: "99.080002", +High: "103.080002", +Low: "96.139999", +Close: "97.989998", +Volume: "189846300", +Adj_Close: "94.326258" +}, +{ +Symbol: "AAPL", +Date: "2014-09-08", +Open: "99.300003", +High: "99.309998", +Low: "98.050003", +Close: "98.360001", +Volume: "46356700", +Adj_Close: "94.682426" +}, +{ +Symbol: "AAPL", +Date: "2014-09-05", +Open: "98.800003", +High: "99.389999", +Low: "98.309998", +Close: "98.970001", +Volume: "58457000", +Adj_Close: "95.26962" +}, +{ +Symbol: "AAPL", +Date: "2014-09-04", +Open: "98.849998", +High: "100.089996", +Low: "97.790001", +Close: "98.120003", +Volume: "85718000", +Adj_Close: "94.451402" +}, +{ +Symbol: "AAPL", +Date: "2014-09-03", +Open: "103.099998", +High: "103.199997", +Low: "98.580002", +Close: "98.940002", +Volume: "125421000", +Adj_Close: "95.240743" +}, +{ +Symbol: "AAPL", +Date: "2014-09-02", +Open: "103.059998", +High: "103.739998", +Low: "102.720001", +Close: "103.300003", +Volume: "53564000", +Adj_Close: "99.437727" +}, +{ +Symbol: "AAPL", +Date: "2014-08-29", +Open: "102.860001", +High: "102.900002", +Low: "102.199997", +Close: "102.50", +Volume: "44595000", +Adj_Close: "98.667636" +}, +{ +Symbol: "AAPL", +Date: "2014-08-28", +Open: "101.589996", +High: "102.779999", +Low: "101.559998", +Close: "102.25", +Volume: "68460000", +Adj_Close: "98.426983" +}, +{ +Symbol: "AAPL", +Date: "2014-08-27", +Open: "101.019997", +High: "102.57", +Low: "100.699997", +Close: "102.129997", +Volume: "52369000", +Adj_Close: "98.311467" +}, +{ +Symbol: "AAPL", +Date: "2014-08-26", +Open: "101.419998", +High: "101.50", +Low: "100.860001", +Close: "100.889999", +Volume: "33152000", +Adj_Close: "97.117831" +}, +{ +Symbol: "AAPL", +Date: "2014-08-25", +Open: "101.790001", +High: "102.169998", +Low: "101.279999", +Close: "101.540001", +Volume: "40270000", +Adj_Close: "97.74353" +}, +{ +Symbol: "AAPL", +Date: "2014-08-22", +Open: "100.290001", +High: "101.470001", +Low: "100.190002", +Close: "101.32", +Volume: "44184000", +Adj_Close: "97.531754" +}, +{ +Symbol: "AAPL", +Date: "2014-08-21", +Open: "100.57", +High: "100.940002", +Low: "100.110001", +Close: "100.580002", +Volume: "33478000", +Adj_Close: "96.819424" +}, +{ +Symbol: "AAPL", +Date: "2014-08-20", +Open: "100.440002", +High: "101.089996", +Low: "99.949997", +Close: "100.57", +Volume: "52699000", +Adj_Close: "96.809796" +}, +{ +Symbol: "AAPL", +Date: "2014-08-19", +Open: "99.410004", +High: "100.68", +Low: "99.32", +Close: "100.529999", +Volume: "69399000", +Adj_Close: "96.771291" +}, +{ +Symbol: "AAPL", +Date: "2014-08-18", +Open: "98.489998", +High: "99.370003", +Low: "97.980003", +Close: "99.160004", +Volume: "47572000", +Adj_Close: "95.452518" +}, +{ +Symbol: "AAPL", +Date: "2014-08-15", +Open: "97.900002", +High: "98.190002", +Low: "96.860001", +Close: "97.980003", +Volume: "48951000", +Adj_Close: "94.316637" +}, +{ +Symbol: "AAPL", +Date: "2014-08-14", +Open: "97.330002", +High: "97.57", +Low: "96.800003", +Close: "97.50", +Volume: "28116000", +Adj_Close: "93.85458" +}, +{ +Symbol: "AAPL", +Date: "2014-08-13", +Open: "96.150002", +High: "97.239998", +Low: "96.040001", +Close: "97.239998", +Volume: "31916000", +Adj_Close: "93.604299" +}, +{ +Symbol: "AAPL", +Date: "2014-08-12", +Open: "96.040001", +High: "96.879997", +Low: "95.610001", +Close: "95.970001", +Volume: "33795000", +Adj_Close: "92.381786" +}, +{ +Symbol: "AAPL", +Date: "2014-08-11", +Open: "95.269997", +High: "96.080002", +Low: "94.839996", +Close: "95.989998", +Volume: "36585000", +Adj_Close: "92.401035" +}, +{ +Symbol: "AAPL", +Date: "2014-08-08", +Open: "94.260002", +High: "94.82", +Low: "93.279999", +Close: "94.739998", +Volume: "41865000", +Adj_Close: "91.197772" +}, +{ +Symbol: "AAPL", +Date: "2014-08-07", +Open: "94.93", +High: "95.949997", +Low: "94.099998", +Close: "94.480003", +Volume: "46711000", +Adj_Close: "90.947498" +}, +{ +Symbol: "AAPL", +Date: "2014-08-06", +Open: "94.75", +High: "95.480003", +Low: "94.709999", +Close: "94.959999", +Volume: "38558000", +Adj_Close: "90.957116" +}, +{ +Symbol: "AAPL", +Date: "2014-08-05", +Open: "95.360001", +High: "95.68", +Low: "94.360001", +Close: "95.120003", +Volume: "55933000", +Adj_Close: "91.110375" +}, +{ +Symbol: "AAPL", +Date: "2014-08-04", +Open: "96.370003", +High: "96.580002", +Low: "95.169998", +Close: "95.589996", +Volume: "39958000", +Adj_Close: "91.560557" +}, +{ +Symbol: "AAPL", +Date: "2014-08-01", +Open: "94.900002", +High: "96.620003", +Low: "94.809998", +Close: "96.129997", +Volume: "48511000", +Adj_Close: "92.077795" +}, +{ +Symbol: "AAPL", +Date: "2014-07-31", +Open: "97.160004", +High: "97.449997", +Low: "95.330002", +Close: "95.599998", +Volume: "56843000", +Adj_Close: "91.570137" +}, +{ +Symbol: "AAPL", +Date: "2014-07-30", +Open: "98.440002", +High: "98.699997", +Low: "97.669998", +Close: "98.150002", +Volume: "33010000", +Adj_Close: "94.012649" +}, +{ +Symbol: "AAPL", +Date: "2014-07-29", +Open: "99.330002", +High: "99.440002", +Low: "98.25", +Close: "98.379997", +Volume: "43143000", +Adj_Close: "94.23295" +}, +{ +Symbol: "AAPL", +Date: "2014-07-28", +Open: "97.82", +High: "99.239998", +Low: "97.550003", +Close: "99.019997", +Volume: "55318000", +Adj_Close: "94.845971" +}, +{ +Symbol: "AAPL", +Date: "2014-07-25", +Open: "96.849998", +High: "97.839996", +Low: "96.639999", +Close: "97.669998", +Volume: "43469000", +Adj_Close: "93.55288" +}, +{ +Symbol: "AAPL", +Date: "2014-07-24", +Open: "97.040001", +High: "97.32", +Low: "96.419998", +Close: "97.029999", +Volume: "45729000", +Adj_Close: "92.939858" +}, +{ +Symbol: "AAPL", +Date: "2014-07-23", +Open: "95.419998", +High: "97.879997", +Low: "95.169998", +Close: "97.190002", +Volume: "92918000", +Adj_Close: "93.093117" +}, +{ +Symbol: "AAPL", +Date: "2014-07-22", +Open: "94.68", +High: "94.889999", +Low: "94.120003", +Close: "94.720001", +Volume: "55197000", +Adj_Close: "90.727235" +}, +{ +Symbol: "AAPL", +Date: "2014-07-21", +Open: "94.989998", +High: "95.00", +Low: "93.720001", +Close: "93.940002", +Volume: "39079000", +Adj_Close: "89.980116" +}, +{ +Symbol: "AAPL", +Date: "2014-07-18", +Open: "93.620003", +High: "94.739998", +Low: "93.019997", +Close: "94.43", +Volume: "49988000", +Adj_Close: "90.449459" +}, +{ +Symbol: "AAPL", +Date: "2014-07-17", +Open: "95.029999", +High: "95.279999", +Low: "92.57", +Close: "93.089996", +Volume: "57298000", +Adj_Close: "89.16594" +}, +{ +Symbol: "AAPL", +Date: "2014-07-16", +Open: "96.970001", +High: "97.099998", +Low: "94.739998", +Close: "94.779999", +Volume: "53396300", +Adj_Close: "90.784704" +}, +{ +Symbol: "AAPL", +Date: "2014-07-15", +Open: "96.800003", +High: "96.849998", +Low: "95.029999", +Close: "95.32", +Volume: "45477900", +Adj_Close: "91.301942" +}, +{ +Symbol: "AAPL", +Date: "2014-07-14", +Open: "95.860001", +High: "96.889999", +Low: "95.650002", +Close: "96.449997", +Volume: "42810000", +Adj_Close: "92.384306" +}, +{ +Symbol: "AAPL", +Date: "2014-07-11", +Open: "95.360001", +High: "95.889999", +Low: "94.860001", +Close: "95.220001", +Volume: "34018000", +Adj_Close: "91.206158" +}, +{ +Symbol: "AAPL", +Date: "2014-07-10", +Open: "93.760002", +High: "95.550003", +Low: "93.519997", +Close: "95.040001", +Volume: "39686000", +Adj_Close: "91.033746" +}, +{ +Symbol: "AAPL", +Date: "2014-07-09", +Open: "95.440002", +High: "95.949997", +Low: "94.760002", +Close: "95.389999", +Volume: "36436000", +Adj_Close: "91.368991" +}, +{ +Symbol: "AAPL", +Date: "2014-07-08", +Open: "96.269997", +High: "96.800003", +Low: "93.919998", +Close: "95.349998", +Volume: "65222000", +Adj_Close: "91.330676" +}, +{ +Symbol: "AAPL", +Date: "2014-07-07", +Open: "94.139999", +High: "95.989998", +Low: "94.099998", +Close: "95.970001", +Volume: "56468000", +Adj_Close: "91.924543" +}, +{ +Symbol: "AAPL", +Date: "2014-07-03", +Open: "93.669998", +High: "94.099998", +Low: "93.199997", +Close: "94.029999", +Volume: "22891800", +Adj_Close: "90.066319" +}, +{ +Symbol: "AAPL", +Date: "2014-07-02", +Open: "93.870003", +High: "94.059998", +Low: "93.089996", +Close: "93.480003", +Volume: "28465000", +Adj_Close: "89.539507" +}, +{ +Symbol: "AAPL", +Date: "2014-07-01", +Open: "93.519997", +High: "94.07", +Low: "93.129997", +Close: "93.519997", +Volume: "38223000", +Adj_Close: "89.577815" +}, +{ +Symbol: "AAPL", +Date: "2014-06-30", +Open: "92.099998", +High: "93.730003", +Low: "92.089996", +Close: "92.93", +Volume: "49482300", +Adj_Close: "89.012689" +}, +{ +Symbol: "AAPL", +Date: "2014-06-27", +Open: "90.82", +High: "92.00", +Low: "90.769997", +Close: "91.980003", +Volume: "64029000", +Adj_Close: "88.102737" +}, +{ +Symbol: "AAPL", +Date: "2014-06-26", +Open: "90.370003", +High: "91.050003", +Low: "89.800003", +Close: "90.900002", +Volume: "32629000", +Adj_Close: "87.068261" +}, +{ +Symbol: "AAPL", +Date: "2014-06-25", +Open: "90.209999", +High: "90.699997", +Low: "89.650002", +Close: "90.360001", +Volume: "36869000", +Adj_Close: "86.551023" +}, +{ +Symbol: "AAPL", +Date: "2014-06-24", +Open: "90.75", +High: "91.739998", +Low: "90.190002", +Close: "90.279999", +Volume: "39036000", +Adj_Close: "86.474394" +}, +{ +Symbol: "AAPL", +Date: "2014-06-23", +Open: "91.32", +High: "91.620003", +Low: "90.599998", +Close: "90.830002", +Volume: "43694000", +Adj_Close: "87.001212" +}, +{ +Symbol: "AAPL", +Date: "2014-06-20", +Open: "91.849998", +High: "92.550003", +Low: "90.900002", +Close: "90.910004", +Volume: "100898000", +Adj_Close: "87.077842" +}, +{ +Symbol: "AAPL", +Date: "2014-06-19", +Open: "92.290001", +High: "92.300003", +Low: "91.339996", +Close: "91.860001", +Volume: "35528000", +Adj_Close: "87.987793" +}, +{ +Symbol: "AAPL", +Date: "2014-06-18", +Open: "92.269997", +High: "92.290001", +Low: "91.349998", +Close: "92.18", +Volume: "33514000", +Adj_Close: "88.294304" +}, +{ +Symbol: "AAPL", +Date: "2014-06-17", +Open: "92.309998", +High: "92.699997", +Low: "91.800003", +Close: "92.080002", +Volume: "29726000", +Adj_Close: "88.198521" +}, +{ +Symbol: "AAPL", +Date: "2014-06-16", +Open: "91.510002", +High: "92.75", +Low: "91.449997", +Close: "92.199997", +Volume: "35561000", +Adj_Close: "88.313457" +}, +{ +Symbol: "AAPL", +Date: "2014-06-13", +Open: "92.199997", +High: "92.440002", +Low: "90.879997", +Close: "91.279999", +Volume: "54525000", +Adj_Close: "87.43224" +}, +{ +Symbol: "AAPL", +Date: "2014-06-12", +Open: "94.040001", +High: "94.120003", +Low: "91.900002", +Close: "92.290001", +Volume: "54749000", +Adj_Close: "88.399667" +}, +{ +Symbol: "AAPL", +Date: "2014-06-11", +Open: "94.129997", +High: "94.760002", +Low: "93.470001", +Close: "93.860001", +Volume: "45681000", +Adj_Close: "89.903486" +}, +{ +Symbol: "AAPL", +Date: "2014-06-10", +Open: "94.730003", +High: "95.050003", +Low: "93.57", +Close: "94.25", +Volume: "62777000", +Adj_Close: "90.277046" +}, +{ +Symbol: "AAPL", +Date: "2014-06-09", +Open: "92.699997", +High: "93.879997", +Low: "91.75", +Close: "93.699997", +Volume: "75415000", +Adj_Close: "89.750227" +}, +{ +Symbol: "AAPL", +Date: "2014-06-06", +Open: "649.900002", +High: "651.259979", +Low: "644.470024", +Close: "645.570023", +Volume: "87484600", +Adj_Close: "88.336725" +}, +{ +Symbol: "AAPL", +Date: "2014-06-05", +Open: "646.199997", +High: "649.370003", +Low: "642.610008", +Close: "647.349983", +Volume: "75951400", +Adj_Close: "88.580287" +}, +{ +Symbol: "AAPL", +Date: "2014-06-04", +Open: "637.44001", +High: "647.890022", +Low: "636.109993", +Close: "644.819992", +Volume: "83870500", +Adj_Close: "88.234095" +}, +{ +Symbol: "AAPL", +Date: "2014-06-03", +Open: "628.459991", +High: "638.740013", +Low: "628.25", +Close: "637.539986", +Volume: "73177300", +Adj_Close: "87.237933" +}, +{ +Symbol: "AAPL", +Date: "2014-06-02", +Open: "633.959984", +High: "634.830017", +Low: "622.500015", +Close: "628.650009", +Volume: "92337700", +Adj_Close: "86.021471" +}, +{ +Symbol: "AAPL", +Date: "2014-05-30", +Open: "637.979996", +High: "644.169991", +Low: "628.900002", +Close: "633.000015", +Volume: "141005200", +Adj_Close: "86.616706" +}, +{ +Symbol: "AAPL", +Date: "2014-05-29", +Open: "627.849991", +High: "636.87001", +Low: "627.769989", +Close: "635.37999", +Volume: "94118500", +Adj_Close: "86.94237" +}, +{ +Symbol: "AAPL", +Date: "2014-05-28", +Open: "626.019989", +High: "629.830009", +Low: "623.779991", +Close: "624.01001", +Volume: "78870400", +Adj_Close: "85.386556" +}, +{ +Symbol: "AAPL", +Date: "2014-05-27", +Open: "615.879997", +High: "625.859985", +Low: "615.630005", +Close: "625.63002", +Volume: "87216500", +Adj_Close: "85.608231" +}, +{ +Symbol: "AAPL", +Date: "2014-05-23", +Open: "607.25", +High: "614.730011", +Low: "606.470009", +Close: "614.129997", +Volume: "58052400", +Adj_Close: "84.034622" +}, +{ +Symbol: "AAPL", +Date: "2014-05-22", +Open: "606.599998", +High: "609.850006", +Low: "604.100021", +Close: "607.269974", +Volume: "50190000", +Adj_Close: "83.095929" +}, +{ +Symbol: "AAPL", +Date: "2014-05-21", +Open: "603.830002", +High: "606.699974", +Low: "602.059975", +Close: "606.310005", +Volume: "49214900", +Adj_Close: "82.964572" +}, +{ +Symbol: "AAPL", +Date: "2014-05-20", +Open: "604.510017", +High: "606.399994", +Low: "600.730011", +Close: "604.710022", +Volume: "58709000", +Adj_Close: "82.745638" +}, +{ +Symbol: "AAPL", +Date: "2014-05-19", +Open: "597.849998", +High: "607.330002", +Low: "597.329987", +Close: "604.590019", +Volume: "79438800", +Adj_Close: "82.729217" +}, +{ +Symbol: "AAPL", +Date: "2014-05-16", +Open: "588.629974", +High: "597.529991", +Low: "585.399994", +Close: "597.510017", +Volume: "69064100", +Adj_Close: "81.760423" +}, +{ +Symbol: "AAPL", +Date: "2014-05-15", +Open: "594.70002", +High: "596.599983", +Low: "588.040001", +Close: "588.819992", +Volume: "57711500", +Adj_Close: "80.571322" +}, +{ +Symbol: "AAPL", +Date: "2014-05-14", +Open: "592.430008", +High: "597.400002", +Low: "591.740005", +Close: "593.869987", +Volume: "41601000", +Adj_Close: "81.262339" +}, +{ +Symbol: "AAPL", +Date: "2014-05-13", +Open: "591.999985", +High: "594.540016", +Low: "590.699982", +Close: "593.760025", +Volume: "39934300", +Adj_Close: "81.247292" +}, +{ +Symbol: "AAPL", +Date: "2014-05-12", +Open: "587.489975", +High: "593.659996", +Low: "587.399986", +Close: "592.830017", +Volume: "53302200", +Adj_Close: "81.120034" +}, +{ +Symbol: "AAPL", +Date: "2014-05-09", +Open: "584.540001", +High: "586.25", +Low: "580.330025", +Close: "585.540024", +Volume: "72899400", +Adj_Close: "80.122506" +}, +{ +Symbol: "AAPL", +Date: "2014-05-08", +Open: "588.249992", +High: "594.410027", +Low: "586.400017", +Close: "587.990013", +Volume: "57574300", +Adj_Close: "80.457751" +}, +{ +Symbol: "AAPL", +Date: "2014-05-07", +Open: "595.249992", +High: "597.289986", +Low: "587.72998", +Close: "592.329979", +Volume: "70716100", +Adj_Close: "80.601425" +}, +{ +Symbol: "AAPL", +Date: "2014-05-06", +Open: "601.799995", +High: "604.409988", +Low: "594.410027", +Close: "594.410027", +Volume: "93641100", +Adj_Close: "80.884468" +}, +{ +Symbol: "AAPL", +Date: "2014-05-05", +Open: "590.140022", +High: "600.999977", +Low: "589.999992", +Close: "600.959976", +Volume: "71766800", +Adj_Close: "81.775753" +}, +{ +Symbol: "AAPL", +Date: "2014-05-02", +Open: "592.340019", +High: "594.199982", +Low: "589.709999", +Close: "592.580025", +Volume: "47878600", +Adj_Close: "80.63545" +}, +{ +Symbol: "AAPL", +Date: "2014-05-01", +Open: "591.999985", +High: "594.799995", +Low: "586.360016", +Close: "591.480026", +Volume: "61012000", +Adj_Close: "80.485767" +}, +{ +Symbol: "AAPL", +Date: "2014-04-30", +Open: "592.639999", +High: "599.430008", +Low: "589.799988", +Close: "590.089981", +Volume: "114160200", +Adj_Close: "80.296616" +}, +{ +Symbol: "AAPL", +Date: "2014-04-29", +Open: "593.739998", +High: "595.979996", +Low: "589.509995", +Close: "592.329979", +Volume: "84344400", +Adj_Close: "80.601425" +}, +{ +Symbol: "AAPL", +Date: "2014-04-28", +Open: "572.800026", +High: "595.749977", +Low: "572.54998", +Close: "594.090019", +Volume: "167371400", +Adj_Close: "80.840922" +}, +{ +Symbol: "AAPL", +Date: "2014-04-25", +Open: "564.529984", +High: "571.990021", +Low: "563.959984", +Close: "571.93998", +Volume: "97568800", +Adj_Close: "77.826851" +}, +{ +Symbol: "AAPL", +Date: "2014-04-24", +Open: "568.210014", +High: "570.000015", +Low: "560.730003", +Close: "567.770004", +Volume: "189977900", +Adj_Close: "77.259421" +}, +{ +Symbol: "AAPL", +Date: "2014-04-23", +Open: "529.060013", +High: "531.13002", +Low: "524.449974", +Close: "524.750008", +Volume: "98735000", +Adj_Close: "71.405466" +}, +{ +Symbol: "AAPL", +Date: "2014-04-22", +Open: "528.309982", +High: "531.830009", +Low: "526.500008", +Close: "531.70002", +Volume: "50640800", +Adj_Close: "72.35119" +}, +{ +Symbol: "AAPL", +Date: "2014-04-21", +Open: "525.339981", +High: "532.139977", +Low: "523.959976", +Close: "531.170021", +Volume: "45637200", +Adj_Close: "72.279071" +}, +{ +Symbol: "AAPL", +Date: "2014-04-17", +Open: "519.999992", +High: "527.76001", +Low: "519.199974", +Close: "524.940025", +Volume: "71083600", +Adj_Close: "71.431323" +}, +{ +Symbol: "AAPL", +Date: "2014-04-16", +Open: "518.049988", +High: "521.090004", +Low: "514.139992", +Close: "519.01001", +Volume: "53691400", +Adj_Close: "70.624395" +}, +{ +Symbol: "AAPL", +Date: "2014-04-15", +Open: "520.270012", +High: "521.639977", +Low: "511.329994", +Close: "517.959999", +Volume: "66622500", +Adj_Close: "70.481514" +}, +{ +Symbol: "AAPL", +Date: "2014-04-14", +Open: "521.900009", +High: "522.159988", +Low: "517.210022", +Close: "521.679977", +Volume: "51418500", +Adj_Close: "70.987711" +}, +{ +Symbol: "AAPL", +Date: "2014-04-11", +Open: "519.000023", +High: "522.830017", +Low: "517.140007", +Close: "519.610023", +Volume: "67929400", +Adj_Close: "70.706042" +}, +{ +Symbol: "AAPL", +Date: "2014-04-10", +Open: "530.680023", +High: "532.240005", +Low: "523.169998", +Close: "523.480019", +Volume: "59913000", +Adj_Close: "71.232652" +}, +{ +Symbol: "AAPL", +Date: "2014-04-09", +Open: "522.639999", +High: "530.490005", +Low: "522.020012", +Close: "530.320015", +Volume: "51542400", +Adj_Close: "72.163406" +}, +{ +Symbol: "AAPL", +Date: "2014-04-08", +Open: "525.190018", +High: "526.120026", +Low: "518.699989", +Close: "523.440018", +Volume: "60972100", +Adj_Close: "71.227209" +}, +{ +Symbol: "AAPL", +Date: "2014-04-07", +Open: "528.019989", +High: "530.900002", +Low: "521.890022", +Close: "523.469978", +Volume: "72462600", +Adj_Close: "71.231286" +}, +{ +Symbol: "AAPL", +Date: "2014-04-04", +Open: "539.810005", +High: "540.000023", +Low: "530.579994", +Close: "531.820023", +Volume: "68812800", +Adj_Close: "72.36752" +}, +{ +Symbol: "AAPL", +Date: "2014-04-03", +Open: "541.390015", +High: "542.50", +Low: "537.640022", +Close: "538.790009", +Volume: "40586000", +Adj_Close: "73.315962" +}, +{ +Symbol: "AAPL", +Date: "2014-04-02", +Open: "542.379997", +High: "543.479996", +Low: "540.260002", +Close: "542.549988", +Volume: "45105200", +Adj_Close: "73.827602" +}, +{ +Symbol: "AAPL", +Date: "2014-04-01", +Open: "537.760025", +High: "541.870026", +Low: "536.769989", +Close: "541.649994", +Volume: "50190000", +Adj_Close: "73.705135" +}, +{ +Symbol: "AAPL", +Date: "2014-03-31", +Open: "539.230019", +High: "540.809975", +Low: "535.930023", +Close: "536.739975", +Volume: "42167300", +Adj_Close: "73.037003" +}, +{ +Symbol: "AAPL", +Date: "2014-03-28", +Open: "538.319984", +High: "538.940025", +Low: "534.249985", +Close: "536.859978", +Volume: "50141000", +Adj_Close: "73.053333" +}, +{ +Symbol: "AAPL", +Date: "2014-03-27", +Open: "540.019997", +High: "541.499977", +Low: "535.120018", +Close: "537.459991", +Volume: "55507900", +Adj_Close: "73.13498" +}, +{ +Symbol: "AAPL", +Date: "2014-03-26", +Open: "546.520012", +High: "549.000015", +Low: "538.860023", +Close: "539.779991", +Volume: "74942000", +Adj_Close: "73.450674" +}, +{ +Symbol: "AAPL", +Date: "2014-03-25", +Open: "541.499977", +High: "545.750008", +Low: "539.589973", +Close: "544.98999", +Volume: "70573300", +Adj_Close: "74.159626" +}, +{ +Symbol: "AAPL", +Date: "2014-03-24", +Open: "538.420013", +High: "540.500008", +Low: "535.05999", +Close: "539.190018", +Volume: "88925200", +Adj_Close: "73.370393" +}, +{ +Symbol: "AAPL", +Date: "2014-03-21", +Open: "531.929985", +High: "533.75", +Low: "526.330017", +Close: "532.86998", +Volume: "93511600", +Adj_Close: "72.510393" +}, +{ +Symbol: "AAPL", +Date: "2014-03-20", +Open: "529.889992", +High: "532.669975", +Low: "527.350014", +Close: "528.700005", +Volume: "52099600", +Adj_Close: "71.942963" +}, +{ +Symbol: "AAPL", +Date: "2014-03-19", +Open: "532.259979", +High: "536.23999", +Low: "528.999985", +Close: "531.26001", +Volume: "56189000", +Adj_Close: "72.291316" +}, +{ +Symbol: "AAPL", +Date: "2014-03-18", +Open: "525.899994", +High: "531.969986", +Low: "525.200005", +Close: "531.399986", +Volume: "52411800", +Adj_Close: "72.310363" +}, +{ +Symbol: "AAPL", +Date: "2014-03-17", +Open: "527.699982", +High: "529.969994", +Low: "525.850006", +Close: "526.740013", +Volume: "49886200", +Adj_Close: "71.676256" +}, +{ +Symbol: "AAPL", +Date: "2014-03-14", +Open: "528.789993", +High: "530.890015", +Low: "523.000008", +Close: "524.68998", +Volume: "59299800", +Adj_Close: "71.397298" +}, +{ +Symbol: "AAPL", +Date: "2014-03-13", +Open: "537.440018", +High: "539.659988", +Low: "529.159988", +Close: "530.650009", +Volume: "64435700", +Adj_Close: "72.20831" +}, +{ +Symbol: "AAPL", +Date: "2014-03-12", +Open: "534.510017", +High: "537.349976", +Low: "532.00", +Close: "536.609985", +Volume: "49831600", +Adj_Close: "73.019315" +}, +{ +Symbol: "AAPL", +Date: "2014-03-11", +Open: "535.450012", +High: "538.740021", +Low: "532.589973", +Close: "536.089973", +Volume: "69806100", +Adj_Close: "72.948554" +}, +{ +Symbol: "AAPL", +Date: "2014-03-10", +Open: "528.360023", +High: "533.330017", +Low: "528.339996", +Close: "530.919975", +Volume: "44646000", +Adj_Close: "72.245046" +}, +{ +Symbol: "AAPL", +Date: "2014-03-07", +Open: "531.090019", +High: "531.980026", +Low: "526.050011", +Close: "530.440018", +Volume: "55182400", +Adj_Close: "72.179735" +}, +{ +Symbol: "AAPL", +Date: "2014-03-06", +Open: "532.789978", +High: "534.440002", +Low: "528.099991", +Close: "530.749985", +Volume: "46372200", +Adj_Close: "72.221914" +}, +{ +Symbol: "AAPL", +Date: "2014-03-05", +Open: "530.919975", +High: "534.750023", +Low: "529.129974", +Close: "532.360008", +Volume: "50015700", +Adj_Close: "72.440998" +}, +{ +Symbol: "AAPL", +Date: "2014-03-04", +Open: "530.999977", +High: "532.640015", +Low: "527.769997", +Close: "531.239983", +Volume: "64785000", +Adj_Close: "72.288591" +}, +{ +Symbol: "AAPL", +Date: "2014-03-03", +Open: "523.419991", +High: "530.650009", +Low: "522.80999", +Close: "527.76001", +Volume: "59695300", +Adj_Close: "71.815053" +}, +{ +Symbol: "AAPL", +Date: "2014-02-28", +Open: "529.079987", +High: "532.749977", +Low: "522.119987", +Close: "526.239975", +Volume: "92992200", +Adj_Close: "71.608214" +}, +{ +Symbol: "AAPL", +Date: "2014-02-27", +Open: "517.140007", +High: "528.780006", +Low: "516.049995", +Close: "527.670021", +Volume: "75470500", +Adj_Close: "71.802807" +}, +{ +Symbol: "AAPL", +Date: "2014-02-26", +Open: "523.610008", +High: "525.00", +Low: "515.599998", +Close: "517.349998", +Volume: "69054300", +Adj_Close: "70.398508" +}, +{ +Symbol: "AAPL", +Date: "2014-02-25", +Open: "529.38002", +High: "529.569984", +Low: "521.000015", +Close: "522.060013", +Volume: "57988000", +Adj_Close: "71.039424" +}, +{ +Symbol: "AAPL", +Date: "2014-02-24", +Open: "523.150024", +High: "529.920006", +Low: "522.420021", +Close: "527.550018", +Volume: "72227400", +Adj_Close: "71.786478" +}, +{ +Symbol: "AAPL", +Date: "2014-02-21", +Open: "532.789978", +High: "534.569992", +Low: "524.599991", +Close: "525.249992", +Volume: "69696200", +Adj_Close: "71.473502" +}, +{ +Symbol: "AAPL", +Date: "2014-02-20", +Open: "532.989983", +High: "537.000008", +Low: "528.999985", +Close: "531.149994", +Volume: "76464500", +Adj_Close: "72.276345" +}, +{ +Symbol: "AAPL", +Date: "2014-02-19", +Open: "544.749985", +High: "546.890007", +Low: "534.350014", +Close: "537.370003", +Volume: "78442000", +Adj_Close: "73.122734" +}, +{ +Symbol: "AAPL", +Date: "2014-02-18", +Open: "546.00", +High: "551.190025", +Low: "545.609978", +Close: "545.990013", +Volume: "65062900", +Adj_Close: "74.295704" +}, +{ +Symbol: "AAPL", +Date: "2014-02-14", +Open: "542.469986", +High: "545.980026", +Low: "541.209984", +Close: "543.990021", +Volume: "68231100", +Adj_Close: "74.023555" +}, +{ +Symbol: "AAPL", +Date: "2014-02-13", +Open: "534.659981", +High: "544.850014", +Low: "534.199997", +Close: "544.429977", +Volume: "76849500", +Adj_Close: "74.083422" +}, +{ +Symbol: "AAPL", +Date: "2014-02-12", +Open: "536.95002", +High: "539.560013", +Low: "533.239975", +Close: "535.919983", +Volume: "77025200", +Adj_Close: "72.925423" +}, +{ +Symbol: "AAPL", +Date: "2014-02-11", +Open: "530.610008", +High: "537.749985", +Low: "529.500023", +Close: "535.959984", +Volume: "70564200", +Adj_Close: "72.930866" +}, +{ +Symbol: "AAPL", +Date: "2014-02-10", +Open: "518.659988", +High: "531.990013", +Low: "518.00", +Close: "528.989998", +Volume: "86389800", +Adj_Close: "71.982424" +}, +{ +Symbol: "AAPL", +Date: "2014-02-07", +Open: "521.379997", +High: "522.929993", +Low: "517.380013", +Close: "519.679985", +Volume: "92570100", +Adj_Close: "70.715562" +}, +{ +Symbol: "AAPL", +Date: "2014-02-06", +Open: "510.060005", +High: "513.499977", +Low: "507.81002", +Close: "512.509995", +Volume: "64441300", +Adj_Close: "69.739904" +}, +{ +Symbol: "AAPL", +Date: "2014-02-05", +Open: "506.560005", +High: "515.279991", +Low: "506.249985", +Close: "512.589996", +Volume: "82086200", +Adj_Close: "69.335766" +}, +{ +Symbol: "AAPL", +Date: "2014-02-04", +Open: "505.849976", +High: "509.459991", +Low: "502.760025", +Close: "508.790016", +Volume: "94170300", +Adj_Close: "68.821759" +}, +{ +Symbol: "AAPL", +Date: "2014-02-03", +Open: "502.610008", +High: "507.730019", +Low: "499.300026", +Close: "501.529984", +Volume: "100366000", +Adj_Close: "67.839727" +}, +{ +Symbol: "AAPL", +Date: "2014-01-31", +Open: "495.179985", +High: "501.529984", +Low: "493.549988", +Close: "500.599976", +Volume: "116199300", +Adj_Close: "67.713929" +}, +{ +Symbol: "AAPL", +Date: "2014-01-30", +Open: "502.539993", +High: "506.499977", +Low: "496.70002", +Close: "499.779984", +Volume: "169625400", +Adj_Close: "67.603012" +}, +{ +Symbol: "AAPL", +Date: "2014-01-29", +Open: "503.950012", +High: "507.37001", +Low: "498.62001", +Close: "500.749992", +Volume: "125702500", +Adj_Close: "67.734221" +}, +{ +Symbol: "AAPL", +Date: "2014-01-28", +Open: "508.760002", +High: "514.999985", +Low: "502.070023", +Close: "506.499977", +Volume: "266380800", +Adj_Close: "68.511996" +}, +{ +Symbol: "AAPL", +Date: "2014-01-27", +Open: "550.07", +High: "554.799988", +Low: "545.750008", +Close: "550.500023", +Volume: "138719700", +Adj_Close: "74.463686" +}, +{ +Symbol: "AAPL", +Date: "2014-01-24", +Open: "554.000023", +High: "555.61998", +Low: "544.749985", +Close: "546.070015", +Volume: "107338700", +Adj_Close: "73.864459" +}, +{ +Symbol: "AAPL", +Date: "2014-01-23", +Open: "549.94001", +High: "556.50", +Low: "544.810013", +Close: "556.179993", +Volume: "100809800", +Adj_Close: "75.23199" +}, +{ +Symbol: "AAPL", +Date: "2014-01-22", +Open: "550.910019", +High: "557.289978", +Low: "547.809975", +Close: "551.509979", +Volume: "94996300", +Adj_Close: "74.600299" +}, +{ +Symbol: "AAPL", +Date: "2014-01-21", +Open: "540.990005", +High: "550.07", +Low: "540.420006", +Close: "549.069977", +Volume: "82131700", +Adj_Close: "74.27025" +}, +{ +Symbol: "AAPL", +Date: "2014-01-17", +Open: "551.480019", +High: "552.069992", +Low: "539.899994", +Close: "540.669998", +Volume: "106684900", +Adj_Close: "73.134023" +}, +{ +Symbol: "AAPL", +Date: "2014-01-16", +Open: "554.900017", +High: "556.850021", +Low: "551.680023", +Close: "554.250015", +Volume: "57319500", +Adj_Close: "74.970931" +}, +{ +Symbol: "AAPL", +Date: "2014-01-15", +Open: "553.520012", +High: "560.200005", +Low: "551.659996", +Close: "557.359993", +Volume: "97909700", +Adj_Close: "75.391604" +}, +{ +Symbol: "AAPL", +Date: "2014-01-14", +Open: "538.220009", +High: "546.730003", +Low: "537.659996", +Close: "546.390022", +Volume: "83140400", +Adj_Close: "73.907745" +}, +{ +Symbol: "AAPL", +Date: "2014-01-13", +Open: "529.910019", +High: "542.50", +Low: "529.880005", +Close: "535.730019", +Volume: "94623200", +Adj_Close: "72.465814" +}, +{ +Symbol: "AAPL", +Date: "2014-01-10", +Open: "539.829979", +High: "540.799988", +Low: "531.109993", +Close: "532.939995", +Volume: "76244000", +Adj_Close: "72.088419" +}, +{ +Symbol: "AAPL", +Date: "2014-01-09", +Open: "546.800018", +High: "546.859993", +Low: "535.349983", +Close: "536.519997", +Volume: "69787200", +Adj_Close: "72.57267" +}, +{ +Symbol: "AAPL", +Date: "2014-01-08", +Open: "538.809982", +High: "545.55999", +Low: "538.68998", +Close: "543.460022", +Volume: "64632400", +Adj_Close: "73.511417" +}, +{ +Symbol: "AAPL", +Date: "2014-01-07", +Open: "544.320015", +High: "545.959999", +Low: "537.919975", +Close: "540.040024", +Volume: "79302300", +Adj_Close: "73.048809" +}, +{ +Symbol: "AAPL", +Date: "2014-01-06", +Open: "537.450005", +High: "546.800018", +Low: "533.599983", +Close: "543.929993", +Volume: "103152700", +Adj_Close: "73.574988" +}, +{ +Symbol: "AAPL", +Date: "2014-01-03", +Open: "552.860023", +High: "553.699989", +Low: "540.429993", +Close: "540.980019", +Volume: "98116900", +Adj_Close: "73.175958" +}, +{ +Symbol: "AAPL", +Date: "2014-01-02", +Open: "555.680008", +High: "557.029999", +Low: "552.020004", +Close: "553.12999", +Volume: "58671200", +Adj_Close: "74.81943" +} +] +} +} +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..a6cc926 --- /dev/null +++ b/index.html @@ -0,0 +1,47 @@ + + + + Fideligard + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..e1a505c --- /dev/null +++ b/js/app.js @@ -0,0 +1,40 @@ +"use strict"; +var app = angular.module('stocks', ['ui-router']); + +//routes +app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){ + $urlRouterProvider.otherwise('/fideligard'); + + $stateProvider + .state('main', { + url: '/fideligard', + controller: "MainCtrl", + views: { + 'stocksTicker':{ + templateUrl: 'js/templates/stocksTicker.html' + }, + 'dateSlider':{ + templateUrl: 'js/templates/dateSlider.html' + }, + 'mainContent':{ + templateUrl: 'js/templates/mainContent.html' + } + } + }) + .state('main.portfolio', { + url: '', + templateUrl: 'js/templates/portfolio.html', + controller: 'PortfolioCtrl' + }) + .state('main.trade', { + url: '/trade', + templateUrl: 'js/templates/trade.html', + controller: 'TradeCtrl' + }) + .state('main.transactions', { + url: '/transactions', + templateUrl: 'js/templates/transactions.html', + controller: 'TransactionsCtrl' + }); + +}]); \ No newline at end of file diff --git a/js/controllers/mainCtrl.js b/js/controllers/mainCtrl.js new file mode 100644 index 0000000..d1b4d8c --- /dev/null +++ b/js/controllers/mainCtrl.js @@ -0,0 +1,6 @@ +"use strict"; +app.controller('MainCtrl', ["$scope", function($scope){ + + + +}]); \ No newline at end of file diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html new file mode 100644 index 0000000..034347e --- /dev/null +++ b/js/templates/dateSlider.html @@ -0,0 +1 @@ +dateSlider.html \ No newline at end of file diff --git a/js/templates/mainContent.html b/js/templates/mainContent.html new file mode 100644 index 0000000..1ba987a --- /dev/null +++ b/js/templates/mainContent.html @@ -0,0 +1 @@ +mainContent.html \ No newline at end of file diff --git a/js/templates/portfolio.html b/js/templates/portfolio.html new file mode 100644 index 0000000..136eb15 --- /dev/null +++ b/js/templates/portfolio.html @@ -0,0 +1 @@ +portfolio.html \ No newline at end of file diff --git a/js/templates/stocksTicker.html b/js/templates/stocksTicker.html new file mode 100644 index 0000000..96ea345 --- /dev/null +++ b/js/templates/stocksTicker.html @@ -0,0 +1 @@ +stocksTicker.html \ No newline at end of file diff --git a/js/templates/trade.html b/js/templates/trade.html new file mode 100644 index 0000000..55b58fb --- /dev/null +++ b/js/templates/trade.html @@ -0,0 +1 @@ +trade.html \ No newline at end of file diff --git a/js/templates/transactions.html b/js/templates/transactions.html new file mode 100644 index 0000000..ec905e3 --- /dev/null +++ b/js/templates/transactions.html @@ -0,0 +1 @@ +transactions.html \ No newline at end of file From a8ab2319c49de5772d1887f7076b33130e72fc12 Mon Sep 17 00:00:00 2001 From: Graham Turner Date: Thu, 29 Sep 2016 13:40:12 -0400 Subject: [PATCH 02/21] issues --- index.html | 9 +++++---- js/app.js | 9 +++++---- js/controllers/mainCtrl.js | 10 ++++++++-- js/templates/dateSlider.html | 5 ++++- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index a6cc926..28ee14c 100644 --- a/index.html +++ b/index.html @@ -29,19 +29,20 @@
-
+
-
+
-
+
+ - \ No newline at end of file + diff --git a/js/app.js b/js/app.js index e1a505c..612ca73 100644 --- a/js/app.js +++ b/js/app.js @@ -1,9 +1,10 @@ "use strict"; -var app = angular.module('stocks', ['ui-router']); +var app = angular.module('stocks', ['ui.router']); //routes app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){ - $urlRouterProvider.otherwise('/fideligard'); + + $urlRouterProvider.otherwise('/fideligard'); $stateProvider .state('main', { @@ -22,7 +23,7 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur } }) .state('main.portfolio', { - url: '', + url: '/portfolio', templateUrl: 'js/templates/portfolio.html', controller: 'PortfolioCtrl' }) @@ -37,4 +38,4 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur controller: 'TransactionsCtrl' }); -}]); \ No newline at end of file +}]); diff --git a/js/controllers/mainCtrl.js b/js/controllers/mainCtrl.js index d1b4d8c..75aa699 100644 --- a/js/controllers/mainCtrl.js +++ b/js/controllers/mainCtrl.js @@ -1,6 +1,12 @@ "use strict"; -app.controller('MainCtrl', ["$scope", function($scope){ +app.controller('MainCtrl', ["$scope", function($scope) { + $scope.selectedDate = 0; + $scope.getDate = function(year, day) { + console.log("Hello"); + var date = new Date(year, 0); // initialize a date in `year-01-01` + return new Date(date.setDate(day)); // add the number of days + } -}]); \ No newline at end of file +}]); diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index 034347e..1331183 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1 +1,4 @@ -dateSlider.html \ No newline at end of file +
+

{{ getDate(2014, selectedDate) }}

+ 1/01/201412/31/2014 +
From 1b183e2ea8916c5b4e88ded0f2f010e1ad319f45 Mon Sep 17 00:00:00 2001 From: David Jiang Date: Thu, 29 Sep 2016 11:06:30 -0700 Subject: [PATCH 03/21] date slider --- js/app.js | 7 ++++--- js/controllers/mainCtrl.js | 3 +-- js/services/dateService.js | 17 +++++++++++++++++ js/templates/dateSlider.html | 4 ++-- 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 js/services/dateService.js diff --git a/js/app.js b/js/app.js index 612ca73..22ce3b8 100644 --- a/js/app.js +++ b/js/app.js @@ -9,18 +9,19 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur $stateProvider .state('main', { url: '/fideligard', - controller: "MainCtrl", views: { 'stocksTicker':{ templateUrl: 'js/templates/stocksTicker.html' }, 'dateSlider':{ - templateUrl: 'js/templates/dateSlider.html' + templateUrl: 'js/templates/dateSlider.html', + controller: "MainCtrl" }, 'mainContent':{ templateUrl: 'js/templates/mainContent.html' } - } + }, + }) .state('main.portfolio', { url: '/portfolio', diff --git a/js/controllers/mainCtrl.js b/js/controllers/mainCtrl.js index 75aa699..e49a32a 100644 --- a/js/controllers/mainCtrl.js +++ b/js/controllers/mainCtrl.js @@ -4,9 +4,8 @@ app.controller('MainCtrl', ["$scope", function($scope) { $scope.selectedDate = 0; $scope.getDate = function(year, day) { - console.log("Hello"); var date = new Date(year, 0); // initialize a date in `year-01-01` return new Date(date.setDate(day)); // add the number of days - } + }; }]); diff --git a/js/services/dateService.js b/js/services/dateService.js new file mode 100644 index 0000000..0d78f6c --- /dev/null +++ b/js/services/dateService.js @@ -0,0 +1,17 @@ +"use strict"; +app.factory('dateService', function(){ + var stub = {}; + + var _date = {}; + + stub.setDate = function(day) { + var date = new Date(2014, 0); // initialize a date in `year-01-01` + angular.copy({date: Date(date.setDate(day))}, _date); // add the number of days + }; + + stub.getDate = function(){ + return _date.date; + }; + + return stub; +}); \ No newline at end of file diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index 1331183..bd1051c 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,4 +1,4 @@
-

{{ getDate(2014, selectedDate) }}

- 1/01/201412/31/2014 +

{{ getDate(2014, selectedDate) | date}}

+ 1/01/201412/31/2014
From 79bebc3c8712030b4ce76469487716702bbbe7cd Mon Sep 17 00:00:00 2001 From: Graham Turner Date: Thu, 29 Sep 2016 14:25:50 -0400 Subject: [PATCH 04/21] updated date service --- index.html | 2 ++ js/app.js | 7 ++++++- js/controllers/mainCtrl.js | 10 +++++----- js/services/dateService.js | 13 +++++++------ js/templates/dateSlider.html | 8 ++++++-- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 28ee14c..90b7571 100644 --- a/index.html +++ b/index.html @@ -43,6 +43,8 @@ + + diff --git a/js/app.js b/js/app.js index 22ce3b8..93d2255 100644 --- a/js/app.js +++ b/js/app.js @@ -21,7 +21,12 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur templateUrl: 'js/templates/mainContent.html' } }, - + resolve: { + date: function(dateService) { + return dateService.getDate(); + } + } + }) .state('main.portfolio', { url: '/portfolio', diff --git a/js/controllers/mainCtrl.js b/js/controllers/mainCtrl.js index e49a32a..afbf96d 100644 --- a/js/controllers/mainCtrl.js +++ b/js/controllers/mainCtrl.js @@ -1,11 +1,11 @@ "use strict"; -app.controller('MainCtrl', ["$scope", function($scope) { +app.controller('MainCtrl', ["$scope", 'date', 'dateService', function($scope, date, dateService) { - $scope.selectedDate = 0; + $scope.selectedDate = date; - $scope.getDate = function(year, day) { - var date = new Date(year, 0); // initialize a date in `year-01-01` - return new Date(date.setDate(day)); // add the number of days + $scope.setDate = function(day) { + console.log(day); + dateService.setDate(day); }; }]); diff --git a/js/services/dateService.js b/js/services/dateService.js index 0d78f6c..c21d25e 100644 --- a/js/services/dateService.js +++ b/js/services/dateService.js @@ -2,16 +2,17 @@ app.factory('dateService', function(){ var stub = {}; - var _date = {}; + var _date = {date: "Hello!"}; stub.setDate = function(day) { - var date = new Date(2014, 0); // initialize a date in `year-01-01` - angular.copy({date: Date(date.setDate(day))}, _date); // add the number of days - }; + var date = new Date(2014, 0); + var updatedDate = new Date(date.setDate(day)); + angular.copy({date: updatedDate}, _date) + }; stub.getDate = function(){ - return _date.date; + return _date; }; return stub; -}); \ No newline at end of file +}); diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index bd1051c..25de01f 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,4 +1,8 @@
-

{{ getDate(2014, selectedDate) | date}}

- 1/01/201412/31/2014 +

{{ selectedDate.date | date }}

+ + 1/01/2014 + + 12/31/2014 +
From 92678c26968786d2e406936ba82429d46c79ad98 Mon Sep 17 00:00:00 2001 From: David Jiang Date: Thu, 29 Sep 2016 14:05:23 -0700 Subject: [PATCH 05/21] starting stock ticker --- js/algorithm_9_29.js | 1 + js/app.js | 8 ++++++-- js/controllers/dateCtrl.js | 19 +++++++++++++++++++ js/controllers/mainCtrl.js | 11 ----------- js/controllers/stocksCtrl.js | 7 +++++++ js/directives/stockTicker.js | 9 +++++++++ js/services/dateService.js | 8 ++++++-- js/services/stocksService.js | 27 +++++++++++++++++++++++++++ js/templates/dateSlider.html | 5 ++++- js/templates/stockTicker.html | 8 ++++++++ js/templates/stocksTicker.html | 2 +- 11 files changed, 88 insertions(+), 17 deletions(-) create mode 100644 js/algorithm_9_29.js create mode 100644 js/controllers/dateCtrl.js delete mode 100644 js/controllers/mainCtrl.js create mode 100644 js/controllers/stocksCtrl.js create mode 100644 js/directives/stockTicker.js create mode 100644 js/services/stocksService.js create mode 100644 js/templates/stockTicker.html diff --git a/js/algorithm_9_29.js b/js/algorithm_9_29.js new file mode 100644 index 0000000..ca55be6 --- /dev/null +++ b/js/algorithm_9_29.js @@ -0,0 +1 @@ +algorithm_9_29.js \ No newline at end of file diff --git a/js/app.js b/js/app.js index 93d2255..44ab078 100644 --- a/js/app.js +++ b/js/app.js @@ -11,11 +11,12 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur url: '/fideligard', views: { 'stocksTicker':{ - templateUrl: 'js/templates/stocksTicker.html' + templateUrl: 'js/templates/stocksTicker.html', + controller: "StocksCtrl" }, 'dateSlider':{ templateUrl: 'js/templates/dateSlider.html', - controller: "MainCtrl" + controller: "DateCtrl" }, 'mainContent':{ templateUrl: 'js/templates/mainContent.html' @@ -24,6 +25,9 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur resolve: { date: function(dateService) { return dateService.getDate(); + }, + stocks: function(StocksService){ + return StocksService.all(); } } diff --git a/js/controllers/dateCtrl.js b/js/controllers/dateCtrl.js new file mode 100644 index 0000000..3cccf55 --- /dev/null +++ b/js/controllers/dateCtrl.js @@ -0,0 +1,19 @@ +"use strict"; +app.controller('DateCtrl', ["$scope", 'date', 'dateService', function($scope, date, dateService) { + + $scope.editing = false; + $scope.selectedDate = date; + + $scope.setDate = function(day) { + dateService.setDay(day); + }; + + $scope.changeDate = function(date){ + dateService.setDate(date); + $scope.editing = !$scope.editing; + }; + + //in order for the slider to follow when the date is manually changed, need to turn the date back into a day value and add that to the slider + //make it more obvious that you can click on the date to change it + +}]); diff --git a/js/controllers/mainCtrl.js b/js/controllers/mainCtrl.js deleted file mode 100644 index afbf96d..0000000 --- a/js/controllers/mainCtrl.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -app.controller('MainCtrl', ["$scope", 'date', 'dateService', function($scope, date, dateService) { - - $scope.selectedDate = date; - - $scope.setDate = function(day) { - console.log(day); - dateService.setDate(day); - }; - -}]); diff --git a/js/controllers/stocksCtrl.js b/js/controllers/stocksCtrl.js new file mode 100644 index 0000000..4e07224 --- /dev/null +++ b/js/controllers/stocksCtrl.js @@ -0,0 +1,7 @@ +"use strict"; +app.controller('StocksCtrl', ["$scope", 'date', 'stocks', function($scope, date, stocks){ + + $scope.selectedDate = date; + $scope.stocks = stocks; + +}]); \ No newline at end of file diff --git a/js/directives/stockTicker.js b/js/directives/stockTicker.js new file mode 100644 index 0000000..6d7cd08 --- /dev/null +++ b/js/directives/stockTicker.js @@ -0,0 +1,9 @@ +app.directive('stockTicker', function(){ + return{ + restrict: "E", + templateUrl: 'js/templates/stockTicker.html', + scope: { + stock: "=" + } + }; +}); \ No newline at end of file diff --git a/js/services/dateService.js b/js/services/dateService.js index c21d25e..7d87b5c 100644 --- a/js/services/dateService.js +++ b/js/services/dateService.js @@ -2,14 +2,18 @@ app.factory('dateService', function(){ var stub = {}; - var _date = {date: "Hello!"}; + var _date = {}; - stub.setDate = function(day) { + stub.setDay = function(day) { var date = new Date(2014, 0); var updatedDate = new Date(date.setDate(day)); angular.copy({date: updatedDate}, _date) }; + stub.setDate = function(date){ + _date.date = date; + }; + stub.getDate = function(){ return _date; }; diff --git a/js/services/stocksService.js b/js/services/stocksService.js new file mode 100644 index 0000000..40fcf1d --- /dev/null +++ b/js/services/stocksService.js @@ -0,0 +1,27 @@ +"use strict"; +app.factory('StocksService', ['$http', function($http){ + + var _stocks = []; + var stub = {}; + + var _populateStocks = function(){ + return $http({ + url: 'AAPL.json', + method: "GET" + }) + .then(function(response){ + return angular.copy(response.results.quote, _stocks); + }); + }; + + stub.all = function(){ + if(_stocks.length){ + return _stocks; + } + else{ + return _populateStocks(); + } + }; + + return stub; +}]); \ No newline at end of file diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index 25de01f..1aa97b7 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,5 +1,8 @@
-

{{ selectedDate.date | date }}

+

{{ selectedDate.date | date }}

+ + + 1/01/2014 diff --git a/js/templates/stockTicker.html b/js/templates/stockTicker.html new file mode 100644 index 0000000..1ef4594 --- /dev/null +++ b/js/templates/stockTicker.html @@ -0,0 +1,8 @@ + + {{stock.symbol}} + + + + + + \ No newline at end of file diff --git a/js/templates/stocksTicker.html b/js/templates/stocksTicker.html index 96ea345..84e62d7 100644 --- a/js/templates/stocksTicker.html +++ b/js/templates/stocksTicker.html @@ -1 +1 @@ -stocksTicker.html \ No newline at end of file + \ No newline at end of file From 969492896c8a2c314534351484b97bc3c5111521 Mon Sep 17 00:00:00 2001 From: Graham Turner Date: Thu, 29 Sep 2016 17:31:17 -0400 Subject: [PATCH 06/21] updated stocksService --- js/algorithm_9_29.js | 1 - js/services/stocksService.js | 45 ++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 6 deletions(-) delete mode 100644 js/algorithm_9_29.js diff --git a/js/algorithm_9_29.js b/js/algorithm_9_29.js deleted file mode 100644 index ca55be6..0000000 --- a/js/algorithm_9_29.js +++ /dev/null @@ -1 +0,0 @@ -algorithm_9_29.js \ No newline at end of file diff --git a/js/services/stocksService.js b/js/services/stocksService.js index 40fcf1d..b7cbba8 100644 --- a/js/services/stocksService.js +++ b/js/services/stocksService.js @@ -1,19 +1,54 @@ "use strict"; -app.factory('StocksService', ['$http', function($http){ +app.factory('StocksService', ['$http', 'dateService', function($http, dateService){ - var _stocks = []; + var _stocks = {}; var stub = {}; + var _dates = {}; - var _populateStocks = function(){ + var _populateStock = function(){ return $http({ url: 'AAPL.json', method: "GET" }) .then(function(response){ - return angular.copy(response.results.quote, _stocks); + response.results.quote.forEach(function(stock) { + _buildStockObject(stock); + _buildDatesArr(stock); + }); + return _stocks; }); }; + _buildStockObject = function(stock) { + if (_stock[stock.Symbol]) { + _stocks[stock.Symbol][stock.date] = stock; + } else { + _stocks[stock.Symbol] = {}; + _stock[stock.Symbol][stock.date] = stock; + } + } + + _buildDatesArr = function(stock) { + if (_dates[stock.Symbol]) { + _dates[stock.Symbol].push(stock.date); + } else { + _dates[stock.Symbol] = [stock.date]; + } + } + + var _sevenDayAverage = function() { + + } + + var stub.thirtyDayAverage = function(symbol) { + var dates = Object.keys(_stocks[symbol]); + return dates; + } + + var stub.currentPrice = function(symbol) { + return _stocks[symbol][dateService.getDate().date].close + } + stub.all = function(){ if(_stocks.length){ return _stocks; @@ -24,4 +59,4 @@ app.factory('StocksService', ['$http', function($http){ }; return stub; -}]); \ No newline at end of file +}]); From 977f4bcccd387e078e49a05625cec1cc789e59f9 Mon Sep 17 00:00:00 2001 From: David Jiang Date: Thu, 29 Sep 2016 15:39:00 -0700 Subject: [PATCH 07/21] redoing stocks service --- AAPL.json | 2602 +--------------------------------- index.html | 6 +- js/app.js | 14 +- js/controllers/dateCtrl.js | 5 +- js/services/dateService.js | 10 +- js/services/stocksService.js | 51 +- js/templates/dateSlider.html | 4 +- 7 files changed, 53 insertions(+), 2639 deletions(-) diff --git a/AAPL.json b/AAPL.json index a0ab395..cbf924a 100644 --- a/AAPL.json +++ b/AAPL.json @@ -1,2601 +1 @@ -{ -query: { -count: 252, -created: "2016-09-29T16:25:29Z", -lang: "en-US", -diagnostics: { -url: [ -{ -execution-start-time: "1", -execution-stop-time: "2", -execution-time: "1", -proxy: "DEFAULT", -content: "http://www.datatables.org/yahoo/finance/yahoo.finance.historicaldata.xml" -}, -{ -execution-start-time: "6", -execution-stop-time: "22", -execution-time: "16", -proxy: "DEFAULT", -content: "http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL" -}, -{ -execution-start-time: "27", -execution-stop-time: "29", -execution-time: "2", -proxy: "DEFAULT", -content: "http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL" -} -], -publiclyCallable: "true", -cache: [ -{ -execution-start-time: "5", -execution-stop-time: "6", -execution-time: "1", -method: "GET", -type: "MEMCACHED", -content: "f756d73c9b6c7b01a1d7f9c2ff5f9809" -}, -{ -execution-start-time: "26", -execution-stop-time: "26", -execution-time: "0", -method: "GET", -type: "MEMCACHED", -content: "230584bed0cbcab0d8e6f863db02c098" -} -], -query: [ -{ -execution-start-time: "6", -execution-stop-time: "25", -execution-time: "19", -params: "{url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}", -content: "select * from csv(0,1) where url=@url" -}, -{ -execution-start-time: "26", -execution-stop-time: "32", -execution-time: "6", -params: "{columnsNames=[Date,Open,High,Low,Close,Volume,Adj_Close], url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}", -content: "select * from csv(2,0) where url=@url and columns=@columnsNames" -} -], -javascript: { -execution-start-time: "3", -execution-stop-time: "968", -execution-time: "964", -instructions-used: "24196224", -table-name: "yahoo.finance.historicaldata" -}, -user-time: "974", -service-time: "20", -build-version: "0.2.54" -}, -results: { -quote: [ -{ -Symbol: "AAPL", -Date: "2014-12-31", -Open: "112.82", -High: "113.129997", -Low: "110.209999", -Close: "110.379997", -Volume: "41403400", -Adj_Close: "106.71374" -}, -{ -Symbol: "AAPL", -Date: "2014-12-30", -Open: "113.639999", -High: "113.919998", -Low: "112.110001", -Close: "112.519997", -Volume: "29881500", -Adj_Close: "108.78266" -}, -{ -Symbol: "AAPL", -Date: "2014-12-29", -Open: "113.790001", -High: "114.769997", -Low: "113.699997", -Close: "113.910004", -Volume: "27598900", -Adj_Close: "110.126498" -}, -{ -Symbol: "AAPL", -Date: "2014-12-26", -Open: "112.099998", -High: "114.519997", -Low: "112.010002", -Close: "113.989998", -Volume: "33721000", -Adj_Close: "110.203835" -}, -{ -Symbol: "AAPL", -Date: "2014-12-24", -Open: "112.580002", -High: "112.709999", -Low: "112.010002", -Close: "112.010002", -Volume: "14479600", -Adj_Close: "108.289605" -}, -{ -Symbol: "AAPL", -Date: "2014-12-23", -Open: "113.230003", -High: "113.330002", -Low: "112.459999", -Close: "112.540001", -Volume: "26028400", -Adj_Close: "108.802" -}, -{ -Symbol: "AAPL", -Date: "2014-12-22", -Open: "112.160004", -High: "113.489998", -Low: "111.970001", -Close: "112.940002", -Volume: "45167500", -Adj_Close: "109.188715" -}, -{ -Symbol: "AAPL", -Date: "2014-12-19", -Open: "112.260002", -High: "113.239998", -Low: "111.660004", -Close: "111.779999", -Volume: "88429800", -Adj_Close: "108.067241" -}, -{ -Symbol: "AAPL", -Date: "2014-12-18", -Open: "111.870003", -High: "112.650002", -Low: "110.660004", -Close: "112.650002", -Volume: "59006200", -Adj_Close: "108.908347" -}, -{ -Symbol: "AAPL", -Date: "2014-12-17", -Open: "107.120003", -High: "109.839996", -Low: "106.82", -Close: "109.410004", -Volume: "53411800", -Adj_Close: "105.775965" -}, -{ -Symbol: "AAPL", -Date: "2014-12-16", -Open: "106.370003", -High: "110.160004", -Low: "106.260002", -Close: "106.75", -Volume: "60790700", -Adj_Close: "103.204313" -}, -{ -Symbol: "AAPL", -Date: "2014-12-15", -Open: "110.699997", -High: "111.599998", -Low: "106.349998", -Close: "108.230003", -Volume: "67218100", -Adj_Close: "104.635158" -}, -{ -Symbol: "AAPL", -Date: "2014-12-12", -Open: "110.459999", -High: "111.870003", -Low: "109.580002", -Close: "109.730003", -Volume: "56028100", -Adj_Close: "106.085336" -}, -{ -Symbol: "AAPL", -Date: "2014-12-11", -Open: "112.260002", -High: "113.800003", -Low: "111.339996", -Close: "111.620003", -Volume: "41401700", -Adj_Close: "107.912559" -}, -{ -Symbol: "AAPL", -Date: "2014-12-10", -Open: "114.410004", -High: "114.849998", -Low: "111.540001", -Close: "111.949997", -Volume: "44565300", -Adj_Close: "108.231593" -}, -{ -Symbol: "AAPL", -Date: "2014-12-09", -Open: "110.190002", -High: "114.300003", -Low: "109.349998", -Close: "114.120003", -Volume: "60208000", -Adj_Close: "110.329522" -}, -{ -Symbol: "AAPL", -Date: "2014-12-08", -Open: "114.099998", -High: "114.650002", -Low: "111.620003", -Close: "112.400002", -Volume: "57664900", -Adj_Close: "108.66665" -}, -{ -Symbol: "AAPL", -Date: "2014-12-05", -Open: "115.989998", -High: "116.080002", -Low: "114.639999", -Close: "115.00", -Volume: "38318900", -Adj_Close: "111.18029" -}, -{ -Symbol: "AAPL", -Date: "2014-12-04", -Open: "115.769997", -High: "117.199997", -Low: "115.290001", -Close: "115.489998", -Volume: "42044500", -Adj_Close: "111.654013" -}, -{ -Symbol: "AAPL", -Date: "2014-12-03", -Open: "115.75", -High: "116.349998", -Low: "115.110001", -Close: "115.93", -Volume: "43063400", -Adj_Close: "112.079401" -}, -{ -Symbol: "AAPL", -Date: "2014-12-02", -Open: "113.50", -High: "115.75", -Low: "112.75", -Close: "114.629997", -Volume: "59348900", -Adj_Close: "110.822577" -}, -{ -Symbol: "AAPL", -Date: "2014-12-01", -Open: "118.809998", -High: "119.25", -Low: "111.269997", -Close: "115.07", -Volume: "83814000", -Adj_Close: "111.247965" -}, -{ -Symbol: "AAPL", -Date: "2014-11-28", -Open: "119.269997", -High: "119.400002", -Low: "118.050003", -Close: "118.93", -Volume: "24814400", -Adj_Close: "114.979756" -}, -{ -Symbol: "AAPL", -Date: "2014-11-26", -Open: "117.940002", -High: "119.099998", -Low: "117.830002", -Close: "119.00", -Volume: "40768300", -Adj_Close: "115.047431" -}, -{ -Symbol: "AAPL", -Date: "2014-11-25", -Open: "119.07", -High: "119.75", -Low: "117.449997", -Close: "117.599998", -Volume: "68840400", -Adj_Close: "113.69393" -}, -{ -Symbol: "AAPL", -Date: "2014-11-24", -Open: "116.849998", -High: "118.769997", -Low: "116.620003", -Close: "118.629997", -Volume: "47450800", -Adj_Close: "114.689718" -}, -{ -Symbol: "AAPL", -Date: "2014-11-21", -Open: "117.510002", -High: "117.57", -Low: "116.029999", -Close: "116.470001", -Volume: "57179300", -Adj_Close: "112.601466" -}, -{ -Symbol: "AAPL", -Date: "2014-11-20", -Open: "114.910004", -High: "116.860001", -Low: "114.849998", -Close: "116.309998", -Volume: "43395500", -Adj_Close: "112.446776" -}, -{ -Symbol: "AAPL", -Date: "2014-11-19", -Open: "115.440002", -High: "115.739998", -Low: "113.800003", -Close: "114.669998", -Volume: "41869200", -Adj_Close: "110.861249" -}, -{ -Symbol: "AAPL", -Date: "2014-11-18", -Open: "113.940002", -High: "115.690002", -Low: "113.889999", -Close: "115.470001", -Volume: "44224000", -Adj_Close: "111.63468" -}, -{ -Symbol: "AAPL", -Date: "2014-11-17", -Open: "114.269997", -High: "117.279999", -Low: "113.300003", -Close: "113.989998", -Volume: "46746700", -Adj_Close: "110.203835" -}, -{ -Symbol: "AAPL", -Date: "2014-11-14", -Open: "113.150002", -High: "114.190002", -Low: "111.209999", -Close: "114.18", -Volume: "44063600", -Adj_Close: "110.387527" -}, -{ -Symbol: "AAPL", -Date: "2014-11-13", -Open: "111.800003", -High: "113.449997", -Low: "111.599998", -Close: "112.82", -Volume: "59522900", -Adj_Close: "109.072698" -}, -{ -Symbol: "AAPL", -Date: "2014-11-12", -Open: "109.379997", -High: "111.43", -Low: "109.370003", -Close: "111.25", -Volume: "46942400", -Adj_Close: "107.554846" -}, -{ -Symbol: "AAPL", -Date: "2014-11-11", -Open: "108.699997", -High: "109.75", -Low: "108.400002", -Close: "109.699997", -Volume: "27442300", -Adj_Close: "106.056326" -}, -{ -Symbol: "AAPL", -Date: "2014-11-10", -Open: "109.019997", -High: "109.330002", -Low: "108.669998", -Close: "108.830002", -Volume: "27195500", -Adj_Close: "105.215228" -}, -{ -Symbol: "AAPL", -Date: "2014-11-07", -Open: "108.75", -High: "109.32", -Low: "108.550003", -Close: "109.010002", -Volume: "33691500", -Adj_Close: "105.389249" -}, -{ -Symbol: "AAPL", -Date: "2014-11-06", -Open: "108.599998", -High: "108.790001", -Low: "107.800003", -Close: "108.699997", -Volume: "34968500", -Adj_Close: "105.089541" -}, -{ -Symbol: "AAPL", -Date: "2014-11-05", -Open: "109.099998", -High: "109.300003", -Low: "108.129997", -Close: "108.860001", -Volume: "37435900", -Adj_Close: "104.789843" -}, -{ -Symbol: "AAPL", -Date: "2014-11-04", -Open: "109.360001", -High: "109.489998", -Low: "107.720001", -Close: "108.599998", -Volume: "41574400", -Adj_Close: "104.539562" -}, -{ -Symbol: "AAPL", -Date: "2014-11-03", -Open: "108.220001", -High: "110.300003", -Low: "108.010002", -Close: "109.400002", -Volume: "52282600", -Adj_Close: "105.309654" -}, -{ -Symbol: "AAPL", -Date: "2014-10-31", -Open: "108.010002", -High: "108.040001", -Low: "107.209999", -Close: "108.00", -Volume: "44639300", -Adj_Close: "103.961997" -}, -{ -Symbol: "AAPL", -Date: "2014-10-30", -Open: "106.959999", -High: "107.349998", -Low: "105.900002", -Close: "106.980003", -Volume: "40654800", -Adj_Close: "102.980136" -}, -{ -Symbol: "AAPL", -Date: "2014-10-29", -Open: "106.650002", -High: "107.370003", -Low: "106.360001", -Close: "107.339996", -Volume: "52687900", -Adj_Close: "103.32667" -}, -{ -Symbol: "AAPL", -Date: "2014-10-28", -Open: "105.400002", -High: "106.739998", -Low: "105.349998", -Close: "106.739998", -Volume: "48060900", -Adj_Close: "102.749105" -}, -{ -Symbol: "AAPL", -Date: "2014-10-27", -Open: "104.849998", -High: "105.480003", -Low: "104.699997", -Close: "105.110001", -Volume: "34187700", -Adj_Close: "101.180051" -}, -{ -Symbol: "AAPL", -Date: "2014-10-24", -Open: "105.18", -High: "105.489998", -Low: "104.529999", -Close: "105.220001", -Volume: "47053900", -Adj_Close: "101.285939" -}, -{ -Symbol: "AAPL", -Date: "2014-10-23", -Open: "104.080002", -High: "105.050003", -Low: "103.629997", -Close: "104.830002", -Volume: "71074700", -Adj_Close: "100.910521" -}, -{ -Symbol: "AAPL", -Date: "2014-10-22", -Open: "102.839996", -High: "104.110001", -Low: "102.599998", -Close: "102.989998", -Volume: "68263100", -Adj_Close: "99.139313" -}, -{ -Symbol: "AAPL", -Date: "2014-10-21", -Open: "103.019997", -High: "103.019997", -Low: "101.269997", -Close: "102.470001", -Volume: "94623900", -Adj_Close: "98.638758" -}, -{ -Symbol: "AAPL", -Date: "2014-10-20", -Open: "98.32", -High: "99.959999", -Low: "98.220001", -Close: "99.760002", -Volume: "77517300", -Adj_Close: "96.030083" -}, -{ -Symbol: "AAPL", -Date: "2014-10-17", -Open: "97.50", -High: "99.00", -Low: "96.809998", -Close: "97.669998", -Volume: "68179700", -Adj_Close: "94.018222" -}, -{ -Symbol: "AAPL", -Date: "2014-10-16", -Open: "95.550003", -High: "97.720001", -Low: "95.410004", -Close: "96.260002", -Volume: "72154500", -Adj_Close: "92.660945" -}, -{ -Symbol: "AAPL", -Date: "2014-10-15", -Open: "97.970001", -High: "99.150002", -Low: "95.18", -Close: "97.540001", -Volume: "100933600", -Adj_Close: "93.893086" -}, -{ -Symbol: "AAPL", -Date: "2014-10-14", -Open: "100.389999", -High: "100.519997", -Low: "98.57", -Close: "98.75", -Volume: "63688600", -Adj_Close: "95.057844" -}, -{ -Symbol: "AAPL", -Date: "2014-10-13", -Open: "101.330002", -High: "101.779999", -Low: "99.809998", -Close: "99.809998", -Volume: "53583400", -Adj_Close: "96.078209" -}, -{ -Symbol: "AAPL", -Date: "2014-10-10", -Open: "100.690002", -High: "102.029999", -Low: "100.300003", -Close: "100.730003", -Volume: "66331600", -Adj_Close: "96.963817" -}, -{ -Symbol: "AAPL", -Date: "2014-10-09", -Open: "101.540001", -High: "102.379997", -Low: "100.610001", -Close: "101.019997", -Volume: "77376500", -Adj_Close: "97.242968" -}, -{ -Symbol: "AAPL", -Date: "2014-10-08", -Open: "98.760002", -High: "101.110001", -Low: "98.309998", -Close: "100.800003", -Volume: "57404700", -Adj_Close: "97.0312" -}, -{ -Symbol: "AAPL", -Date: "2014-10-07", -Open: "99.43", -High: "100.120003", -Low: "98.730003", -Close: "98.75", -Volume: "42094200", -Adj_Close: "95.057844" -}, -{ -Symbol: "AAPL", -Date: "2014-10-06", -Open: "99.949997", -High: "100.650002", -Low: "99.419998", -Close: "99.620003", -Volume: "37051200", -Adj_Close: "95.895318" -}, -{ -Symbol: "AAPL", -Date: "2014-10-03", -Open: "99.440002", -High: "100.209999", -Low: "99.040001", -Close: "99.620003", -Volume: "43469600", -Adj_Close: "95.895318" -}, -{ -Symbol: "AAPL", -Date: "2014-10-02", -Open: "99.269997", -High: "100.220001", -Low: "98.040001", -Close: "99.900002", -Volume: "47757800", -Adj_Close: "96.164848" -}, -{ -Symbol: "AAPL", -Date: "2014-10-01", -Open: "100.589996", -High: "100.690002", -Low: "98.699997", -Close: "99.18", -Volume: "51491300", -Adj_Close: "95.471767" -}, -{ -Symbol: "AAPL", -Date: "2014-09-30", -Open: "100.809998", -High: "101.540001", -Low: "100.529999", -Close: "100.75", -Volume: "55264100", -Adj_Close: "96.983066" -}, -{ -Symbol: "AAPL", -Date: "2014-09-29", -Open: "98.650002", -High: "100.440002", -Low: "98.629997", -Close: "100.110001", -Volume: "49766300", -Adj_Close: "96.366996" -}, -{ -Symbol: "AAPL", -Date: "2014-09-26", -Open: "98.529999", -High: "100.75", -Low: "98.400002", -Close: "100.75", -Volume: "62370500", -Adj_Close: "96.983066" -}, -{ -Symbol: "AAPL", -Date: "2014-09-25", -Open: "100.510002", -High: "100.709999", -Low: "97.720001", -Close: "97.870003", -Volume: "100092000", -Adj_Close: "94.210749" -}, -{ -Symbol: "AAPL", -Date: "2014-09-24", -Open: "102.160004", -High: "102.849998", -Low: "101.199997", -Close: "101.75", -Volume: "60171800", -Adj_Close: "97.945677" -}, -{ -Symbol: "AAPL", -Date: "2014-09-23", -Open: "100.599998", -High: "102.940002", -Low: "100.540001", -Close: "102.639999", -Volume: "63402200", -Adj_Close: "98.802401" -}, -{ -Symbol: "AAPL", -Date: "2014-09-22", -Open: "101.800003", -High: "102.139999", -Low: "100.580002", -Close: "101.059998", -Volume: "52788400", -Adj_Close: "97.281473" -}, -{ -Symbol: "AAPL", -Date: "2014-09-19", -Open: "102.290001", -High: "102.349998", -Low: "100.50", -Close: "100.959999", -Volume: "70902400", -Adj_Close: "97.185214" -}, -{ -Symbol: "AAPL", -Date: "2014-09-18", -Open: "101.93", -High: "102.349998", -Low: "101.559998", -Close: "101.790001", -Volume: "37299400", -Adj_Close: "97.984183" -}, -{ -Symbol: "AAPL", -Date: "2014-09-17", -Open: "101.269997", -High: "101.800003", -Low: "100.589996", -Close: "101.580002", -Volume: "60926500", -Adj_Close: "97.782035" -}, -{ -Symbol: "AAPL", -Date: "2014-09-16", -Open: "99.800003", -High: "101.260002", -Low: "98.889999", -Close: "100.860001", -Volume: "66908100", -Adj_Close: "97.088954" -}, -{ -Symbol: "AAPL", -Date: "2014-09-15", -Open: "102.809998", -High: "103.050003", -Low: "101.440002", -Close: "101.629997", -Volume: "61316500", -Adj_Close: "97.830161" -}, -{ -Symbol: "AAPL", -Date: "2014-09-12", -Open: "101.209999", -High: "102.190002", -Low: "101.080002", -Close: "101.660004", -Volume: "62626100", -Adj_Close: "97.859046" -}, -{ -Symbol: "AAPL", -Date: "2014-09-11", -Open: "100.410004", -High: "101.440002", -Low: "99.620003", -Close: "101.43", -Volume: "62353100", -Adj_Close: "97.637642" -}, -{ -Symbol: "AAPL", -Date: "2014-09-10", -Open: "98.010002", -High: "101.110001", -Low: "97.760002", -Close: "101.00", -Volume: "100869600", -Adj_Close: "97.223719" -}, -{ -Symbol: "AAPL", -Date: "2014-09-09", -Open: "99.080002", -High: "103.080002", -Low: "96.139999", -Close: "97.989998", -Volume: "189846300", -Adj_Close: "94.326258" -}, -{ -Symbol: "AAPL", -Date: "2014-09-08", -Open: "99.300003", -High: "99.309998", -Low: "98.050003", -Close: "98.360001", -Volume: "46356700", -Adj_Close: "94.682426" -}, -{ -Symbol: "AAPL", -Date: "2014-09-05", -Open: "98.800003", -High: "99.389999", -Low: "98.309998", -Close: "98.970001", -Volume: "58457000", -Adj_Close: "95.26962" -}, -{ -Symbol: "AAPL", -Date: "2014-09-04", -Open: "98.849998", -High: "100.089996", -Low: "97.790001", -Close: "98.120003", -Volume: "85718000", -Adj_Close: "94.451402" -}, -{ -Symbol: "AAPL", -Date: "2014-09-03", -Open: "103.099998", -High: "103.199997", -Low: "98.580002", -Close: "98.940002", -Volume: "125421000", -Adj_Close: "95.240743" -}, -{ -Symbol: "AAPL", -Date: "2014-09-02", -Open: "103.059998", -High: "103.739998", -Low: "102.720001", -Close: "103.300003", -Volume: "53564000", -Adj_Close: "99.437727" -}, -{ -Symbol: "AAPL", -Date: "2014-08-29", -Open: "102.860001", -High: "102.900002", -Low: "102.199997", -Close: "102.50", -Volume: "44595000", -Adj_Close: "98.667636" -}, -{ -Symbol: "AAPL", -Date: "2014-08-28", -Open: "101.589996", -High: "102.779999", -Low: "101.559998", -Close: "102.25", -Volume: "68460000", -Adj_Close: "98.426983" -}, -{ -Symbol: "AAPL", -Date: "2014-08-27", -Open: "101.019997", -High: "102.57", -Low: "100.699997", -Close: "102.129997", -Volume: "52369000", -Adj_Close: "98.311467" -}, -{ -Symbol: "AAPL", -Date: "2014-08-26", -Open: "101.419998", -High: "101.50", -Low: "100.860001", -Close: "100.889999", -Volume: "33152000", -Adj_Close: "97.117831" -}, -{ -Symbol: "AAPL", -Date: "2014-08-25", -Open: "101.790001", -High: "102.169998", -Low: "101.279999", -Close: "101.540001", -Volume: "40270000", -Adj_Close: "97.74353" -}, -{ -Symbol: "AAPL", -Date: "2014-08-22", -Open: "100.290001", -High: "101.470001", -Low: "100.190002", -Close: "101.32", -Volume: "44184000", -Adj_Close: "97.531754" -}, -{ -Symbol: "AAPL", -Date: "2014-08-21", -Open: "100.57", -High: "100.940002", -Low: "100.110001", -Close: "100.580002", -Volume: "33478000", -Adj_Close: "96.819424" -}, -{ -Symbol: "AAPL", -Date: "2014-08-20", -Open: "100.440002", -High: "101.089996", -Low: "99.949997", -Close: "100.57", -Volume: "52699000", -Adj_Close: "96.809796" -}, -{ -Symbol: "AAPL", -Date: "2014-08-19", -Open: "99.410004", -High: "100.68", -Low: "99.32", -Close: "100.529999", -Volume: "69399000", -Adj_Close: "96.771291" -}, -{ -Symbol: "AAPL", -Date: "2014-08-18", -Open: "98.489998", -High: "99.370003", -Low: "97.980003", -Close: "99.160004", -Volume: "47572000", -Adj_Close: "95.452518" -}, -{ -Symbol: "AAPL", -Date: "2014-08-15", -Open: "97.900002", -High: "98.190002", -Low: "96.860001", -Close: "97.980003", -Volume: "48951000", -Adj_Close: "94.316637" -}, -{ -Symbol: "AAPL", -Date: "2014-08-14", -Open: "97.330002", -High: "97.57", -Low: "96.800003", -Close: "97.50", -Volume: "28116000", -Adj_Close: "93.85458" -}, -{ -Symbol: "AAPL", -Date: "2014-08-13", -Open: "96.150002", -High: "97.239998", -Low: "96.040001", -Close: "97.239998", -Volume: "31916000", -Adj_Close: "93.604299" -}, -{ -Symbol: "AAPL", -Date: "2014-08-12", -Open: "96.040001", -High: "96.879997", -Low: "95.610001", -Close: "95.970001", -Volume: "33795000", -Adj_Close: "92.381786" -}, -{ -Symbol: "AAPL", -Date: "2014-08-11", -Open: "95.269997", -High: "96.080002", -Low: "94.839996", -Close: "95.989998", -Volume: "36585000", -Adj_Close: "92.401035" -}, -{ -Symbol: "AAPL", -Date: "2014-08-08", -Open: "94.260002", -High: "94.82", -Low: "93.279999", -Close: "94.739998", -Volume: "41865000", -Adj_Close: "91.197772" -}, -{ -Symbol: "AAPL", -Date: "2014-08-07", -Open: "94.93", -High: "95.949997", -Low: "94.099998", -Close: "94.480003", -Volume: "46711000", -Adj_Close: "90.947498" -}, -{ -Symbol: "AAPL", -Date: "2014-08-06", -Open: "94.75", -High: "95.480003", -Low: "94.709999", -Close: "94.959999", -Volume: "38558000", -Adj_Close: "90.957116" -}, -{ -Symbol: "AAPL", -Date: "2014-08-05", -Open: "95.360001", -High: "95.68", -Low: "94.360001", -Close: "95.120003", -Volume: "55933000", -Adj_Close: "91.110375" -}, -{ -Symbol: "AAPL", -Date: "2014-08-04", -Open: "96.370003", -High: "96.580002", -Low: "95.169998", -Close: "95.589996", -Volume: "39958000", -Adj_Close: "91.560557" -}, -{ -Symbol: "AAPL", -Date: "2014-08-01", -Open: "94.900002", -High: "96.620003", -Low: "94.809998", -Close: "96.129997", -Volume: "48511000", -Adj_Close: "92.077795" -}, -{ -Symbol: "AAPL", -Date: "2014-07-31", -Open: "97.160004", -High: "97.449997", -Low: "95.330002", -Close: "95.599998", -Volume: "56843000", -Adj_Close: "91.570137" -}, -{ -Symbol: "AAPL", -Date: "2014-07-30", -Open: "98.440002", -High: "98.699997", -Low: "97.669998", -Close: "98.150002", -Volume: "33010000", -Adj_Close: "94.012649" -}, -{ -Symbol: "AAPL", -Date: "2014-07-29", -Open: "99.330002", -High: "99.440002", -Low: "98.25", -Close: "98.379997", -Volume: "43143000", -Adj_Close: "94.23295" -}, -{ -Symbol: "AAPL", -Date: "2014-07-28", -Open: "97.82", -High: "99.239998", -Low: "97.550003", -Close: "99.019997", -Volume: "55318000", -Adj_Close: "94.845971" -}, -{ -Symbol: "AAPL", -Date: "2014-07-25", -Open: "96.849998", -High: "97.839996", -Low: "96.639999", -Close: "97.669998", -Volume: "43469000", -Adj_Close: "93.55288" -}, -{ -Symbol: "AAPL", -Date: "2014-07-24", -Open: "97.040001", -High: "97.32", -Low: "96.419998", -Close: "97.029999", -Volume: "45729000", -Adj_Close: "92.939858" -}, -{ -Symbol: "AAPL", -Date: "2014-07-23", -Open: "95.419998", -High: "97.879997", -Low: "95.169998", -Close: "97.190002", -Volume: "92918000", -Adj_Close: "93.093117" -}, -{ -Symbol: "AAPL", -Date: "2014-07-22", -Open: "94.68", -High: "94.889999", -Low: "94.120003", -Close: "94.720001", -Volume: "55197000", -Adj_Close: "90.727235" -}, -{ -Symbol: "AAPL", -Date: "2014-07-21", -Open: "94.989998", -High: "95.00", -Low: "93.720001", -Close: "93.940002", -Volume: "39079000", -Adj_Close: "89.980116" -}, -{ -Symbol: "AAPL", -Date: "2014-07-18", -Open: "93.620003", -High: "94.739998", -Low: "93.019997", -Close: "94.43", -Volume: "49988000", -Adj_Close: "90.449459" -}, -{ -Symbol: "AAPL", -Date: "2014-07-17", -Open: "95.029999", -High: "95.279999", -Low: "92.57", -Close: "93.089996", -Volume: "57298000", -Adj_Close: "89.16594" -}, -{ -Symbol: "AAPL", -Date: "2014-07-16", -Open: "96.970001", -High: "97.099998", -Low: "94.739998", -Close: "94.779999", -Volume: "53396300", -Adj_Close: "90.784704" -}, -{ -Symbol: "AAPL", -Date: "2014-07-15", -Open: "96.800003", -High: "96.849998", -Low: "95.029999", -Close: "95.32", -Volume: "45477900", -Adj_Close: "91.301942" -}, -{ -Symbol: "AAPL", -Date: "2014-07-14", -Open: "95.860001", -High: "96.889999", -Low: "95.650002", -Close: "96.449997", -Volume: "42810000", -Adj_Close: "92.384306" -}, -{ -Symbol: "AAPL", -Date: "2014-07-11", -Open: "95.360001", -High: "95.889999", -Low: "94.860001", -Close: "95.220001", -Volume: "34018000", -Adj_Close: "91.206158" -}, -{ -Symbol: "AAPL", -Date: "2014-07-10", -Open: "93.760002", -High: "95.550003", -Low: "93.519997", -Close: "95.040001", -Volume: "39686000", -Adj_Close: "91.033746" -}, -{ -Symbol: "AAPL", -Date: "2014-07-09", -Open: "95.440002", -High: "95.949997", -Low: "94.760002", -Close: "95.389999", -Volume: "36436000", -Adj_Close: "91.368991" -}, -{ -Symbol: "AAPL", -Date: "2014-07-08", -Open: "96.269997", -High: "96.800003", -Low: "93.919998", -Close: "95.349998", -Volume: "65222000", -Adj_Close: "91.330676" -}, -{ -Symbol: "AAPL", -Date: "2014-07-07", -Open: "94.139999", -High: "95.989998", -Low: "94.099998", -Close: "95.970001", -Volume: "56468000", -Adj_Close: "91.924543" -}, -{ -Symbol: "AAPL", -Date: "2014-07-03", -Open: "93.669998", -High: "94.099998", -Low: "93.199997", -Close: "94.029999", -Volume: "22891800", -Adj_Close: "90.066319" -}, -{ -Symbol: "AAPL", -Date: "2014-07-02", -Open: "93.870003", -High: "94.059998", -Low: "93.089996", -Close: "93.480003", -Volume: "28465000", -Adj_Close: "89.539507" -}, -{ -Symbol: "AAPL", -Date: "2014-07-01", -Open: "93.519997", -High: "94.07", -Low: "93.129997", -Close: "93.519997", -Volume: "38223000", -Adj_Close: "89.577815" -}, -{ -Symbol: "AAPL", -Date: "2014-06-30", -Open: "92.099998", -High: "93.730003", -Low: "92.089996", -Close: "92.93", -Volume: "49482300", -Adj_Close: "89.012689" -}, -{ -Symbol: "AAPL", -Date: "2014-06-27", -Open: "90.82", -High: "92.00", -Low: "90.769997", -Close: "91.980003", -Volume: "64029000", -Adj_Close: "88.102737" -}, -{ -Symbol: "AAPL", -Date: "2014-06-26", -Open: "90.370003", -High: "91.050003", -Low: "89.800003", -Close: "90.900002", -Volume: "32629000", -Adj_Close: "87.068261" -}, -{ -Symbol: "AAPL", -Date: "2014-06-25", -Open: "90.209999", -High: "90.699997", -Low: "89.650002", -Close: "90.360001", -Volume: "36869000", -Adj_Close: "86.551023" -}, -{ -Symbol: "AAPL", -Date: "2014-06-24", -Open: "90.75", -High: "91.739998", -Low: "90.190002", -Close: "90.279999", -Volume: "39036000", -Adj_Close: "86.474394" -}, -{ -Symbol: "AAPL", -Date: "2014-06-23", -Open: "91.32", -High: "91.620003", -Low: "90.599998", -Close: "90.830002", -Volume: "43694000", -Adj_Close: "87.001212" -}, -{ -Symbol: "AAPL", -Date: "2014-06-20", -Open: "91.849998", -High: "92.550003", -Low: "90.900002", -Close: "90.910004", -Volume: "100898000", -Adj_Close: "87.077842" -}, -{ -Symbol: "AAPL", -Date: "2014-06-19", -Open: "92.290001", -High: "92.300003", -Low: "91.339996", -Close: "91.860001", -Volume: "35528000", -Adj_Close: "87.987793" -}, -{ -Symbol: "AAPL", -Date: "2014-06-18", -Open: "92.269997", -High: "92.290001", -Low: "91.349998", -Close: "92.18", -Volume: "33514000", -Adj_Close: "88.294304" -}, -{ -Symbol: "AAPL", -Date: "2014-06-17", -Open: "92.309998", -High: "92.699997", -Low: "91.800003", -Close: "92.080002", -Volume: "29726000", -Adj_Close: "88.198521" -}, -{ -Symbol: "AAPL", -Date: "2014-06-16", -Open: "91.510002", -High: "92.75", -Low: "91.449997", -Close: "92.199997", -Volume: "35561000", -Adj_Close: "88.313457" -}, -{ -Symbol: "AAPL", -Date: "2014-06-13", -Open: "92.199997", -High: "92.440002", -Low: "90.879997", -Close: "91.279999", -Volume: "54525000", -Adj_Close: "87.43224" -}, -{ -Symbol: "AAPL", -Date: "2014-06-12", -Open: "94.040001", -High: "94.120003", -Low: "91.900002", -Close: "92.290001", -Volume: "54749000", -Adj_Close: "88.399667" -}, -{ -Symbol: "AAPL", -Date: "2014-06-11", -Open: "94.129997", -High: "94.760002", -Low: "93.470001", -Close: "93.860001", -Volume: "45681000", -Adj_Close: "89.903486" -}, -{ -Symbol: "AAPL", -Date: "2014-06-10", -Open: "94.730003", -High: "95.050003", -Low: "93.57", -Close: "94.25", -Volume: "62777000", -Adj_Close: "90.277046" -}, -{ -Symbol: "AAPL", -Date: "2014-06-09", -Open: "92.699997", -High: "93.879997", -Low: "91.75", -Close: "93.699997", -Volume: "75415000", -Adj_Close: "89.750227" -}, -{ -Symbol: "AAPL", -Date: "2014-06-06", -Open: "649.900002", -High: "651.259979", -Low: "644.470024", -Close: "645.570023", -Volume: "87484600", -Adj_Close: "88.336725" -}, -{ -Symbol: "AAPL", -Date: "2014-06-05", -Open: "646.199997", -High: "649.370003", -Low: "642.610008", -Close: "647.349983", -Volume: "75951400", -Adj_Close: "88.580287" -}, -{ -Symbol: "AAPL", -Date: "2014-06-04", -Open: "637.44001", -High: "647.890022", -Low: "636.109993", -Close: "644.819992", -Volume: "83870500", -Adj_Close: "88.234095" -}, -{ -Symbol: "AAPL", -Date: "2014-06-03", -Open: "628.459991", -High: "638.740013", -Low: "628.25", -Close: "637.539986", -Volume: "73177300", -Adj_Close: "87.237933" -}, -{ -Symbol: "AAPL", -Date: "2014-06-02", -Open: "633.959984", -High: "634.830017", -Low: "622.500015", -Close: "628.650009", -Volume: "92337700", -Adj_Close: "86.021471" -}, -{ -Symbol: "AAPL", -Date: "2014-05-30", -Open: "637.979996", -High: "644.169991", -Low: "628.900002", -Close: "633.000015", -Volume: "141005200", -Adj_Close: "86.616706" -}, -{ -Symbol: "AAPL", -Date: "2014-05-29", -Open: "627.849991", -High: "636.87001", -Low: "627.769989", -Close: "635.37999", -Volume: "94118500", -Adj_Close: "86.94237" -}, -{ -Symbol: "AAPL", -Date: "2014-05-28", -Open: "626.019989", -High: "629.830009", -Low: "623.779991", -Close: "624.01001", -Volume: "78870400", -Adj_Close: "85.386556" -}, -{ -Symbol: "AAPL", -Date: "2014-05-27", -Open: "615.879997", -High: "625.859985", -Low: "615.630005", -Close: "625.63002", -Volume: "87216500", -Adj_Close: "85.608231" -}, -{ -Symbol: "AAPL", -Date: "2014-05-23", -Open: "607.25", -High: "614.730011", -Low: "606.470009", -Close: "614.129997", -Volume: "58052400", -Adj_Close: "84.034622" -}, -{ -Symbol: "AAPL", -Date: "2014-05-22", -Open: "606.599998", -High: "609.850006", -Low: "604.100021", -Close: "607.269974", -Volume: "50190000", -Adj_Close: "83.095929" -}, -{ -Symbol: "AAPL", -Date: "2014-05-21", -Open: "603.830002", -High: "606.699974", -Low: "602.059975", -Close: "606.310005", -Volume: "49214900", -Adj_Close: "82.964572" -}, -{ -Symbol: "AAPL", -Date: "2014-05-20", -Open: "604.510017", -High: "606.399994", -Low: "600.730011", -Close: "604.710022", -Volume: "58709000", -Adj_Close: "82.745638" -}, -{ -Symbol: "AAPL", -Date: "2014-05-19", -Open: "597.849998", -High: "607.330002", -Low: "597.329987", -Close: "604.590019", -Volume: "79438800", -Adj_Close: "82.729217" -}, -{ -Symbol: "AAPL", -Date: "2014-05-16", -Open: "588.629974", -High: "597.529991", -Low: "585.399994", -Close: "597.510017", -Volume: "69064100", -Adj_Close: "81.760423" -}, -{ -Symbol: "AAPL", -Date: "2014-05-15", -Open: "594.70002", -High: "596.599983", -Low: "588.040001", -Close: "588.819992", -Volume: "57711500", -Adj_Close: "80.571322" -}, -{ -Symbol: "AAPL", -Date: "2014-05-14", -Open: "592.430008", -High: "597.400002", -Low: "591.740005", -Close: "593.869987", -Volume: "41601000", -Adj_Close: "81.262339" -}, -{ -Symbol: "AAPL", -Date: "2014-05-13", -Open: "591.999985", -High: "594.540016", -Low: "590.699982", -Close: "593.760025", -Volume: "39934300", -Adj_Close: "81.247292" -}, -{ -Symbol: "AAPL", -Date: "2014-05-12", -Open: "587.489975", -High: "593.659996", -Low: "587.399986", -Close: "592.830017", -Volume: "53302200", -Adj_Close: "81.120034" -}, -{ -Symbol: "AAPL", -Date: "2014-05-09", -Open: "584.540001", -High: "586.25", -Low: "580.330025", -Close: "585.540024", -Volume: "72899400", -Adj_Close: "80.122506" -}, -{ -Symbol: "AAPL", -Date: "2014-05-08", -Open: "588.249992", -High: "594.410027", -Low: "586.400017", -Close: "587.990013", -Volume: "57574300", -Adj_Close: "80.457751" -}, -{ -Symbol: "AAPL", -Date: "2014-05-07", -Open: "595.249992", -High: "597.289986", -Low: "587.72998", -Close: "592.329979", -Volume: "70716100", -Adj_Close: "80.601425" -}, -{ -Symbol: "AAPL", -Date: "2014-05-06", -Open: "601.799995", -High: "604.409988", -Low: "594.410027", -Close: "594.410027", -Volume: "93641100", -Adj_Close: "80.884468" -}, -{ -Symbol: "AAPL", -Date: "2014-05-05", -Open: "590.140022", -High: "600.999977", -Low: "589.999992", -Close: "600.959976", -Volume: "71766800", -Adj_Close: "81.775753" -}, -{ -Symbol: "AAPL", -Date: "2014-05-02", -Open: "592.340019", -High: "594.199982", -Low: "589.709999", -Close: "592.580025", -Volume: "47878600", -Adj_Close: "80.63545" -}, -{ -Symbol: "AAPL", -Date: "2014-05-01", -Open: "591.999985", -High: "594.799995", -Low: "586.360016", -Close: "591.480026", -Volume: "61012000", -Adj_Close: "80.485767" -}, -{ -Symbol: "AAPL", -Date: "2014-04-30", -Open: "592.639999", -High: "599.430008", -Low: "589.799988", -Close: "590.089981", -Volume: "114160200", -Adj_Close: "80.296616" -}, -{ -Symbol: "AAPL", -Date: "2014-04-29", -Open: "593.739998", -High: "595.979996", -Low: "589.509995", -Close: "592.329979", -Volume: "84344400", -Adj_Close: "80.601425" -}, -{ -Symbol: "AAPL", -Date: "2014-04-28", -Open: "572.800026", -High: "595.749977", -Low: "572.54998", -Close: "594.090019", -Volume: "167371400", -Adj_Close: "80.840922" -}, -{ -Symbol: "AAPL", -Date: "2014-04-25", -Open: "564.529984", -High: "571.990021", -Low: "563.959984", -Close: "571.93998", -Volume: "97568800", -Adj_Close: "77.826851" -}, -{ -Symbol: "AAPL", -Date: "2014-04-24", -Open: "568.210014", -High: "570.000015", -Low: "560.730003", -Close: "567.770004", -Volume: "189977900", -Adj_Close: "77.259421" -}, -{ -Symbol: "AAPL", -Date: "2014-04-23", -Open: "529.060013", -High: "531.13002", -Low: "524.449974", -Close: "524.750008", -Volume: "98735000", -Adj_Close: "71.405466" -}, -{ -Symbol: "AAPL", -Date: "2014-04-22", -Open: "528.309982", -High: "531.830009", -Low: "526.500008", -Close: "531.70002", -Volume: "50640800", -Adj_Close: "72.35119" -}, -{ -Symbol: "AAPL", -Date: "2014-04-21", -Open: "525.339981", -High: "532.139977", -Low: "523.959976", -Close: "531.170021", -Volume: "45637200", -Adj_Close: "72.279071" -}, -{ -Symbol: "AAPL", -Date: "2014-04-17", -Open: "519.999992", -High: "527.76001", -Low: "519.199974", -Close: "524.940025", -Volume: "71083600", -Adj_Close: "71.431323" -}, -{ -Symbol: "AAPL", -Date: "2014-04-16", -Open: "518.049988", -High: "521.090004", -Low: "514.139992", -Close: "519.01001", -Volume: "53691400", -Adj_Close: "70.624395" -}, -{ -Symbol: "AAPL", -Date: "2014-04-15", -Open: "520.270012", -High: "521.639977", -Low: "511.329994", -Close: "517.959999", -Volume: "66622500", -Adj_Close: "70.481514" -}, -{ -Symbol: "AAPL", -Date: "2014-04-14", -Open: "521.900009", -High: "522.159988", -Low: "517.210022", -Close: "521.679977", -Volume: "51418500", -Adj_Close: "70.987711" -}, -{ -Symbol: "AAPL", -Date: "2014-04-11", -Open: "519.000023", -High: "522.830017", -Low: "517.140007", -Close: "519.610023", -Volume: "67929400", -Adj_Close: "70.706042" -}, -{ -Symbol: "AAPL", -Date: "2014-04-10", -Open: "530.680023", -High: "532.240005", -Low: "523.169998", -Close: "523.480019", -Volume: "59913000", -Adj_Close: "71.232652" -}, -{ -Symbol: "AAPL", -Date: "2014-04-09", -Open: "522.639999", -High: "530.490005", -Low: "522.020012", -Close: "530.320015", -Volume: "51542400", -Adj_Close: "72.163406" -}, -{ -Symbol: "AAPL", -Date: "2014-04-08", -Open: "525.190018", -High: "526.120026", -Low: "518.699989", -Close: "523.440018", -Volume: "60972100", -Adj_Close: "71.227209" -}, -{ -Symbol: "AAPL", -Date: "2014-04-07", -Open: "528.019989", -High: "530.900002", -Low: "521.890022", -Close: "523.469978", -Volume: "72462600", -Adj_Close: "71.231286" -}, -{ -Symbol: "AAPL", -Date: "2014-04-04", -Open: "539.810005", -High: "540.000023", -Low: "530.579994", -Close: "531.820023", -Volume: "68812800", -Adj_Close: "72.36752" -}, -{ -Symbol: "AAPL", -Date: "2014-04-03", -Open: "541.390015", -High: "542.50", -Low: "537.640022", -Close: "538.790009", -Volume: "40586000", -Adj_Close: "73.315962" -}, -{ -Symbol: "AAPL", -Date: "2014-04-02", -Open: "542.379997", -High: "543.479996", -Low: "540.260002", -Close: "542.549988", -Volume: "45105200", -Adj_Close: "73.827602" -}, -{ -Symbol: "AAPL", -Date: "2014-04-01", -Open: "537.760025", -High: "541.870026", -Low: "536.769989", -Close: "541.649994", -Volume: "50190000", -Adj_Close: "73.705135" -}, -{ -Symbol: "AAPL", -Date: "2014-03-31", -Open: "539.230019", -High: "540.809975", -Low: "535.930023", -Close: "536.739975", -Volume: "42167300", -Adj_Close: "73.037003" -}, -{ -Symbol: "AAPL", -Date: "2014-03-28", -Open: "538.319984", -High: "538.940025", -Low: "534.249985", -Close: "536.859978", -Volume: "50141000", -Adj_Close: "73.053333" -}, -{ -Symbol: "AAPL", -Date: "2014-03-27", -Open: "540.019997", -High: "541.499977", -Low: "535.120018", -Close: "537.459991", -Volume: "55507900", -Adj_Close: "73.13498" -}, -{ -Symbol: "AAPL", -Date: "2014-03-26", -Open: "546.520012", -High: "549.000015", -Low: "538.860023", -Close: "539.779991", -Volume: "74942000", -Adj_Close: "73.450674" -}, -{ -Symbol: "AAPL", -Date: "2014-03-25", -Open: "541.499977", -High: "545.750008", -Low: "539.589973", -Close: "544.98999", -Volume: "70573300", -Adj_Close: "74.159626" -}, -{ -Symbol: "AAPL", -Date: "2014-03-24", -Open: "538.420013", -High: "540.500008", -Low: "535.05999", -Close: "539.190018", -Volume: "88925200", -Adj_Close: "73.370393" -}, -{ -Symbol: "AAPL", -Date: "2014-03-21", -Open: "531.929985", -High: "533.75", -Low: "526.330017", -Close: "532.86998", -Volume: "93511600", -Adj_Close: "72.510393" -}, -{ -Symbol: "AAPL", -Date: "2014-03-20", -Open: "529.889992", -High: "532.669975", -Low: "527.350014", -Close: "528.700005", -Volume: "52099600", -Adj_Close: "71.942963" -}, -{ -Symbol: "AAPL", -Date: "2014-03-19", -Open: "532.259979", -High: "536.23999", -Low: "528.999985", -Close: "531.26001", -Volume: "56189000", -Adj_Close: "72.291316" -}, -{ -Symbol: "AAPL", -Date: "2014-03-18", -Open: "525.899994", -High: "531.969986", -Low: "525.200005", -Close: "531.399986", -Volume: "52411800", -Adj_Close: "72.310363" -}, -{ -Symbol: "AAPL", -Date: "2014-03-17", -Open: "527.699982", -High: "529.969994", -Low: "525.850006", -Close: "526.740013", -Volume: "49886200", -Adj_Close: "71.676256" -}, -{ -Symbol: "AAPL", -Date: "2014-03-14", -Open: "528.789993", -High: "530.890015", -Low: "523.000008", -Close: "524.68998", -Volume: "59299800", -Adj_Close: "71.397298" -}, -{ -Symbol: "AAPL", -Date: "2014-03-13", -Open: "537.440018", -High: "539.659988", -Low: "529.159988", -Close: "530.650009", -Volume: "64435700", -Adj_Close: "72.20831" -}, -{ -Symbol: "AAPL", -Date: "2014-03-12", -Open: "534.510017", -High: "537.349976", -Low: "532.00", -Close: "536.609985", -Volume: "49831600", -Adj_Close: "73.019315" -}, -{ -Symbol: "AAPL", -Date: "2014-03-11", -Open: "535.450012", -High: "538.740021", -Low: "532.589973", -Close: "536.089973", -Volume: "69806100", -Adj_Close: "72.948554" -}, -{ -Symbol: "AAPL", -Date: "2014-03-10", -Open: "528.360023", -High: "533.330017", -Low: "528.339996", -Close: "530.919975", -Volume: "44646000", -Adj_Close: "72.245046" -}, -{ -Symbol: "AAPL", -Date: "2014-03-07", -Open: "531.090019", -High: "531.980026", -Low: "526.050011", -Close: "530.440018", -Volume: "55182400", -Adj_Close: "72.179735" -}, -{ -Symbol: "AAPL", -Date: "2014-03-06", -Open: "532.789978", -High: "534.440002", -Low: "528.099991", -Close: "530.749985", -Volume: "46372200", -Adj_Close: "72.221914" -}, -{ -Symbol: "AAPL", -Date: "2014-03-05", -Open: "530.919975", -High: "534.750023", -Low: "529.129974", -Close: "532.360008", -Volume: "50015700", -Adj_Close: "72.440998" -}, -{ -Symbol: "AAPL", -Date: "2014-03-04", -Open: "530.999977", -High: "532.640015", -Low: "527.769997", -Close: "531.239983", -Volume: "64785000", -Adj_Close: "72.288591" -}, -{ -Symbol: "AAPL", -Date: "2014-03-03", -Open: "523.419991", -High: "530.650009", -Low: "522.80999", -Close: "527.76001", -Volume: "59695300", -Adj_Close: "71.815053" -}, -{ -Symbol: "AAPL", -Date: "2014-02-28", -Open: "529.079987", -High: "532.749977", -Low: "522.119987", -Close: "526.239975", -Volume: "92992200", -Adj_Close: "71.608214" -}, -{ -Symbol: "AAPL", -Date: "2014-02-27", -Open: "517.140007", -High: "528.780006", -Low: "516.049995", -Close: "527.670021", -Volume: "75470500", -Adj_Close: "71.802807" -}, -{ -Symbol: "AAPL", -Date: "2014-02-26", -Open: "523.610008", -High: "525.00", -Low: "515.599998", -Close: "517.349998", -Volume: "69054300", -Adj_Close: "70.398508" -}, -{ -Symbol: "AAPL", -Date: "2014-02-25", -Open: "529.38002", -High: "529.569984", -Low: "521.000015", -Close: "522.060013", -Volume: "57988000", -Adj_Close: "71.039424" -}, -{ -Symbol: "AAPL", -Date: "2014-02-24", -Open: "523.150024", -High: "529.920006", -Low: "522.420021", -Close: "527.550018", -Volume: "72227400", -Adj_Close: "71.786478" -}, -{ -Symbol: "AAPL", -Date: "2014-02-21", -Open: "532.789978", -High: "534.569992", -Low: "524.599991", -Close: "525.249992", -Volume: "69696200", -Adj_Close: "71.473502" -}, -{ -Symbol: "AAPL", -Date: "2014-02-20", -Open: "532.989983", -High: "537.000008", -Low: "528.999985", -Close: "531.149994", -Volume: "76464500", -Adj_Close: "72.276345" -}, -{ -Symbol: "AAPL", -Date: "2014-02-19", -Open: "544.749985", -High: "546.890007", -Low: "534.350014", -Close: "537.370003", -Volume: "78442000", -Adj_Close: "73.122734" -}, -{ -Symbol: "AAPL", -Date: "2014-02-18", -Open: "546.00", -High: "551.190025", -Low: "545.609978", -Close: "545.990013", -Volume: "65062900", -Adj_Close: "74.295704" -}, -{ -Symbol: "AAPL", -Date: "2014-02-14", -Open: "542.469986", -High: "545.980026", -Low: "541.209984", -Close: "543.990021", -Volume: "68231100", -Adj_Close: "74.023555" -}, -{ -Symbol: "AAPL", -Date: "2014-02-13", -Open: "534.659981", -High: "544.850014", -Low: "534.199997", -Close: "544.429977", -Volume: "76849500", -Adj_Close: "74.083422" -}, -{ -Symbol: "AAPL", -Date: "2014-02-12", -Open: "536.95002", -High: "539.560013", -Low: "533.239975", -Close: "535.919983", -Volume: "77025200", -Adj_Close: "72.925423" -}, -{ -Symbol: "AAPL", -Date: "2014-02-11", -Open: "530.610008", -High: "537.749985", -Low: "529.500023", -Close: "535.959984", -Volume: "70564200", -Adj_Close: "72.930866" -}, -{ -Symbol: "AAPL", -Date: "2014-02-10", -Open: "518.659988", -High: "531.990013", -Low: "518.00", -Close: "528.989998", -Volume: "86389800", -Adj_Close: "71.982424" -}, -{ -Symbol: "AAPL", -Date: "2014-02-07", -Open: "521.379997", -High: "522.929993", -Low: "517.380013", -Close: "519.679985", -Volume: "92570100", -Adj_Close: "70.715562" -}, -{ -Symbol: "AAPL", -Date: "2014-02-06", -Open: "510.060005", -High: "513.499977", -Low: "507.81002", -Close: "512.509995", -Volume: "64441300", -Adj_Close: "69.739904" -}, -{ -Symbol: "AAPL", -Date: "2014-02-05", -Open: "506.560005", -High: "515.279991", -Low: "506.249985", -Close: "512.589996", -Volume: "82086200", -Adj_Close: "69.335766" -}, -{ -Symbol: "AAPL", -Date: "2014-02-04", -Open: "505.849976", -High: "509.459991", -Low: "502.760025", -Close: "508.790016", -Volume: "94170300", -Adj_Close: "68.821759" -}, -{ -Symbol: "AAPL", -Date: "2014-02-03", -Open: "502.610008", -High: "507.730019", -Low: "499.300026", -Close: "501.529984", -Volume: "100366000", -Adj_Close: "67.839727" -}, -{ -Symbol: "AAPL", -Date: "2014-01-31", -Open: "495.179985", -High: "501.529984", -Low: "493.549988", -Close: "500.599976", -Volume: "116199300", -Adj_Close: "67.713929" -}, -{ -Symbol: "AAPL", -Date: "2014-01-30", -Open: "502.539993", -High: "506.499977", -Low: "496.70002", -Close: "499.779984", -Volume: "169625400", -Adj_Close: "67.603012" -}, -{ -Symbol: "AAPL", -Date: "2014-01-29", -Open: "503.950012", -High: "507.37001", -Low: "498.62001", -Close: "500.749992", -Volume: "125702500", -Adj_Close: "67.734221" -}, -{ -Symbol: "AAPL", -Date: "2014-01-28", -Open: "508.760002", -High: "514.999985", -Low: "502.070023", -Close: "506.499977", -Volume: "266380800", -Adj_Close: "68.511996" -}, -{ -Symbol: "AAPL", -Date: "2014-01-27", -Open: "550.07", -High: "554.799988", -Low: "545.750008", -Close: "550.500023", -Volume: "138719700", -Adj_Close: "74.463686" -}, -{ -Symbol: "AAPL", -Date: "2014-01-24", -Open: "554.000023", -High: "555.61998", -Low: "544.749985", -Close: "546.070015", -Volume: "107338700", -Adj_Close: "73.864459" -}, -{ -Symbol: "AAPL", -Date: "2014-01-23", -Open: "549.94001", -High: "556.50", -Low: "544.810013", -Close: "556.179993", -Volume: "100809800", -Adj_Close: "75.23199" -}, -{ -Symbol: "AAPL", -Date: "2014-01-22", -Open: "550.910019", -High: "557.289978", -Low: "547.809975", -Close: "551.509979", -Volume: "94996300", -Adj_Close: "74.600299" -}, -{ -Symbol: "AAPL", -Date: "2014-01-21", -Open: "540.990005", -High: "550.07", -Low: "540.420006", -Close: "549.069977", -Volume: "82131700", -Adj_Close: "74.27025" -}, -{ -Symbol: "AAPL", -Date: "2014-01-17", -Open: "551.480019", -High: "552.069992", -Low: "539.899994", -Close: "540.669998", -Volume: "106684900", -Adj_Close: "73.134023" -}, -{ -Symbol: "AAPL", -Date: "2014-01-16", -Open: "554.900017", -High: "556.850021", -Low: "551.680023", -Close: "554.250015", -Volume: "57319500", -Adj_Close: "74.970931" -}, -{ -Symbol: "AAPL", -Date: "2014-01-15", -Open: "553.520012", -High: "560.200005", -Low: "551.659996", -Close: "557.359993", -Volume: "97909700", -Adj_Close: "75.391604" -}, -{ -Symbol: "AAPL", -Date: "2014-01-14", -Open: "538.220009", -High: "546.730003", -Low: "537.659996", -Close: "546.390022", -Volume: "83140400", -Adj_Close: "73.907745" -}, -{ -Symbol: "AAPL", -Date: "2014-01-13", -Open: "529.910019", -High: "542.50", -Low: "529.880005", -Close: "535.730019", -Volume: "94623200", -Adj_Close: "72.465814" -}, -{ -Symbol: "AAPL", -Date: "2014-01-10", -Open: "539.829979", -High: "540.799988", -Low: "531.109993", -Close: "532.939995", -Volume: "76244000", -Adj_Close: "72.088419" -}, -{ -Symbol: "AAPL", -Date: "2014-01-09", -Open: "546.800018", -High: "546.859993", -Low: "535.349983", -Close: "536.519997", -Volume: "69787200", -Adj_Close: "72.57267" -}, -{ -Symbol: "AAPL", -Date: "2014-01-08", -Open: "538.809982", -High: "545.55999", -Low: "538.68998", -Close: "543.460022", -Volume: "64632400", -Adj_Close: "73.511417" -}, -{ -Symbol: "AAPL", -Date: "2014-01-07", -Open: "544.320015", -High: "545.959999", -Low: "537.919975", -Close: "540.040024", -Volume: "79302300", -Adj_Close: "73.048809" -}, -{ -Symbol: "AAPL", -Date: "2014-01-06", -Open: "537.450005", -High: "546.800018", -Low: "533.599983", -Close: "543.929993", -Volume: "103152700", -Adj_Close: "73.574988" -}, -{ -Symbol: "AAPL", -Date: "2014-01-03", -Open: "552.860023", -High: "553.699989", -Low: "540.429993", -Close: "540.980019", -Volume: "98116900", -Adj_Close: "73.175958" -}, -{ -Symbol: "AAPL", -Date: "2014-01-02", -Open: "555.680008", -High: "557.029999", -Low: "552.020004", -Close: "553.12999", -Volume: "58671200", -Adj_Close: "74.81943" -} -] -} -} -} \ No newline at end of file +{"query":{"count":252,"created":"2016-09-29T21:11:41Z","lang":"en-US","diagnostics":{"url":[{"execution-start-time":"1","execution-stop-time":"2","execution-time":"1","proxy":"DEFAULT","content":"http://www.datatables.org/yahoo/finance/yahoo.finance.historicaldata.xml"},{"execution-start-time":"6","execution-stop-time":"7","execution-time":"1","proxy":"DEFAULT","content":"http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL"},{"execution-start-time":"12","execution-stop-time":"12","execution-time":"0","proxy":"DEFAULT","content":"http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL"}],"publiclyCallable":"true","cache":[{"execution-start-time":"5","execution-stop-time":"6","execution-time":"1","method":"GET","type":"MEMCACHED","content":"f756d73c9b6c7b01a1d7f9c2ff5f9809"},{"execution-start-time":"10","execution-stop-time":"11","execution-time":"1","method":"GET","type":"MEMCACHED","content":"230584bed0cbcab0d8e6f863db02c098"}],"query":[{"execution-start-time":"6","execution-stop-time":"10","execution-time":"4","params":"{url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}","content":"select * from csv(0,1) where url=@url"},{"execution-start-time":"11","execution-stop-time":"15","execution-time":"4","params":"{columnsNames=[Date,Open,High,Low,Close,Volume,Adj_Close], url=[http://ichart.finance.yahoo.com/table.csv?a=0&b=1&e=31&g=d&c=2014&d=11&f=2014&s=AAPL]}","content":"select * from csv(2,0) where url=@url and columns=@columnsNames"}],"javascript":{"execution-start-time":"3","execution-stop-time":"1030","execution-time":"1026","instructions-used":"24196224","table-name":"yahoo.finance.historicaldata"},"user-time":"1038","service-time":"4","build-version":"0.2.54"},"results":{"quote":[{"Symbol":"AAPL","Date":"2014-12-31","Open":"112.82","High":"113.129997","Low":"110.209999","Close":"110.379997","Volume":"41403400","Adj_Close":"106.71374"},{"Symbol":"AAPL","Date":"2014-12-30","Open":"113.639999","High":"113.919998","Low":"112.110001","Close":"112.519997","Volume":"29881500","Adj_Close":"108.78266"},{"Symbol":"AAPL","Date":"2014-12-29","Open":"113.790001","High":"114.769997","Low":"113.699997","Close":"113.910004","Volume":"27598900","Adj_Close":"110.126498"},{"Symbol":"AAPL","Date":"2014-12-26","Open":"112.099998","High":"114.519997","Low":"112.010002","Close":"113.989998","Volume":"33721000","Adj_Close":"110.203835"},{"Symbol":"AAPL","Date":"2014-12-24","Open":"112.580002","High":"112.709999","Low":"112.010002","Close":"112.010002","Volume":"14479600","Adj_Close":"108.289605"},{"Symbol":"AAPL","Date":"2014-12-23","Open":"113.230003","High":"113.330002","Low":"112.459999","Close":"112.540001","Volume":"26028400","Adj_Close":"108.802"},{"Symbol":"AAPL","Date":"2014-12-22","Open":"112.160004","High":"113.489998","Low":"111.970001","Close":"112.940002","Volume":"45167500","Adj_Close":"109.188715"},{"Symbol":"AAPL","Date":"2014-12-19","Open":"112.260002","High":"113.239998","Low":"111.660004","Close":"111.779999","Volume":"88429800","Adj_Close":"108.067241"},{"Symbol":"AAPL","Date":"2014-12-18","Open":"111.870003","High":"112.650002","Low":"110.660004","Close":"112.650002","Volume":"59006200","Adj_Close":"108.908347"},{"Symbol":"AAPL","Date":"2014-12-17","Open":"107.120003","High":"109.839996","Low":"106.82","Close":"109.410004","Volume":"53411800","Adj_Close":"105.775965"},{"Symbol":"AAPL","Date":"2014-12-16","Open":"106.370003","High":"110.160004","Low":"106.260002","Close":"106.75","Volume":"60790700","Adj_Close":"103.204313"},{"Symbol":"AAPL","Date":"2014-12-15","Open":"110.699997","High":"111.599998","Low":"106.349998","Close":"108.230003","Volume":"67218100","Adj_Close":"104.635158"},{"Symbol":"AAPL","Date":"2014-12-12","Open":"110.459999","High":"111.870003","Low":"109.580002","Close":"109.730003","Volume":"56028100","Adj_Close":"106.085336"},{"Symbol":"AAPL","Date":"2014-12-11","Open":"112.260002","High":"113.800003","Low":"111.339996","Close":"111.620003","Volume":"41401700","Adj_Close":"107.912559"},{"Symbol":"AAPL","Date":"2014-12-10","Open":"114.410004","High":"114.849998","Low":"111.540001","Close":"111.949997","Volume":"44565300","Adj_Close":"108.231593"},{"Symbol":"AAPL","Date":"2014-12-09","Open":"110.190002","High":"114.300003","Low":"109.349998","Close":"114.120003","Volume":"60208000","Adj_Close":"110.329522"},{"Symbol":"AAPL","Date":"2014-12-08","Open":"114.099998","High":"114.650002","Low":"111.620003","Close":"112.400002","Volume":"57664900","Adj_Close":"108.66665"},{"Symbol":"AAPL","Date":"2014-12-05","Open":"115.989998","High":"116.080002","Low":"114.639999","Close":"115.00","Volume":"38318900","Adj_Close":"111.18029"},{"Symbol":"AAPL","Date":"2014-12-04","Open":"115.769997","High":"117.199997","Low":"115.290001","Close":"115.489998","Volume":"42044500","Adj_Close":"111.654013"},{"Symbol":"AAPL","Date":"2014-12-03","Open":"115.75","High":"116.349998","Low":"115.110001","Close":"115.93","Volume":"43063400","Adj_Close":"112.079401"},{"Symbol":"AAPL","Date":"2014-12-02","Open":"113.50","High":"115.75","Low":"112.75","Close":"114.629997","Volume":"59348900","Adj_Close":"110.822577"},{"Symbol":"AAPL","Date":"2014-12-01","Open":"118.809998","High":"119.25","Low":"111.269997","Close":"115.07","Volume":"83814000","Adj_Close":"111.247965"},{"Symbol":"AAPL","Date":"2014-11-28","Open":"119.269997","High":"119.400002","Low":"118.050003","Close":"118.93","Volume":"24814400","Adj_Close":"114.979756"},{"Symbol":"AAPL","Date":"2014-11-26","Open":"117.940002","High":"119.099998","Low":"117.830002","Close":"119.00","Volume":"40768300","Adj_Close":"115.047431"},{"Symbol":"AAPL","Date":"2014-11-25","Open":"119.07","High":"119.75","Low":"117.449997","Close":"117.599998","Volume":"68840400","Adj_Close":"113.69393"},{"Symbol":"AAPL","Date":"2014-11-24","Open":"116.849998","High":"118.769997","Low":"116.620003","Close":"118.629997","Volume":"47450800","Adj_Close":"114.689718"},{"Symbol":"AAPL","Date":"2014-11-21","Open":"117.510002","High":"117.57","Low":"116.029999","Close":"116.470001","Volume":"57179300","Adj_Close":"112.601466"},{"Symbol":"AAPL","Date":"2014-11-20","Open":"114.910004","High":"116.860001","Low":"114.849998","Close":"116.309998","Volume":"43395500","Adj_Close":"112.446776"},{"Symbol":"AAPL","Date":"2014-11-19","Open":"115.440002","High":"115.739998","Low":"113.800003","Close":"114.669998","Volume":"41869200","Adj_Close":"110.861249"},{"Symbol":"AAPL","Date":"2014-11-18","Open":"113.940002","High":"115.690002","Low":"113.889999","Close":"115.470001","Volume":"44224000","Adj_Close":"111.63468"},{"Symbol":"AAPL","Date":"2014-11-17","Open":"114.269997","High":"117.279999","Low":"113.300003","Close":"113.989998","Volume":"46746700","Adj_Close":"110.203835"},{"Symbol":"AAPL","Date":"2014-11-14","Open":"113.150002","High":"114.190002","Low":"111.209999","Close":"114.18","Volume":"44063600","Adj_Close":"110.387527"},{"Symbol":"AAPL","Date":"2014-11-13","Open":"111.800003","High":"113.449997","Low":"111.599998","Close":"112.82","Volume":"59522900","Adj_Close":"109.072698"},{"Symbol":"AAPL","Date":"2014-11-12","Open":"109.379997","High":"111.43","Low":"109.370003","Close":"111.25","Volume":"46942400","Adj_Close":"107.554846"},{"Symbol":"AAPL","Date":"2014-11-11","Open":"108.699997","High":"109.75","Low":"108.400002","Close":"109.699997","Volume":"27442300","Adj_Close":"106.056326"},{"Symbol":"AAPL","Date":"2014-11-10","Open":"109.019997","High":"109.330002","Low":"108.669998","Close":"108.830002","Volume":"27195500","Adj_Close":"105.215228"},{"Symbol":"AAPL","Date":"2014-11-07","Open":"108.75","High":"109.32","Low":"108.550003","Close":"109.010002","Volume":"33691500","Adj_Close":"105.389249"},{"Symbol":"AAPL","Date":"2014-11-06","Open":"108.599998","High":"108.790001","Low":"107.800003","Close":"108.699997","Volume":"34968500","Adj_Close":"105.089541"},{"Symbol":"AAPL","Date":"2014-11-05","Open":"109.099998","High":"109.300003","Low":"108.129997","Close":"108.860001","Volume":"37435900","Adj_Close":"104.789843"},{"Symbol":"AAPL","Date":"2014-11-04","Open":"109.360001","High":"109.489998","Low":"107.720001","Close":"108.599998","Volume":"41574400","Adj_Close":"104.539562"},{"Symbol":"AAPL","Date":"2014-11-03","Open":"108.220001","High":"110.300003","Low":"108.010002","Close":"109.400002","Volume":"52282600","Adj_Close":"105.309654"},{"Symbol":"AAPL","Date":"2014-10-31","Open":"108.010002","High":"108.040001","Low":"107.209999","Close":"108.00","Volume":"44639300","Adj_Close":"103.961997"},{"Symbol":"AAPL","Date":"2014-10-30","Open":"106.959999","High":"107.349998","Low":"105.900002","Close":"106.980003","Volume":"40654800","Adj_Close":"102.980136"},{"Symbol":"AAPL","Date":"2014-10-29","Open":"106.650002","High":"107.370003","Low":"106.360001","Close":"107.339996","Volume":"52687900","Adj_Close":"103.32667"},{"Symbol":"AAPL","Date":"2014-10-28","Open":"105.400002","High":"106.739998","Low":"105.349998","Close":"106.739998","Volume":"48060900","Adj_Close":"102.749105"},{"Symbol":"AAPL","Date":"2014-10-27","Open":"104.849998","High":"105.480003","Low":"104.699997","Close":"105.110001","Volume":"34187700","Adj_Close":"101.180051"},{"Symbol":"AAPL","Date":"2014-10-24","Open":"105.18","High":"105.489998","Low":"104.529999","Close":"105.220001","Volume":"47053900","Adj_Close":"101.285939"},{"Symbol":"AAPL","Date":"2014-10-23","Open":"104.080002","High":"105.050003","Low":"103.629997","Close":"104.830002","Volume":"71074700","Adj_Close":"100.910521"},{"Symbol":"AAPL","Date":"2014-10-22","Open":"102.839996","High":"104.110001","Low":"102.599998","Close":"102.989998","Volume":"68263100","Adj_Close":"99.139313"},{"Symbol":"AAPL","Date":"2014-10-21","Open":"103.019997","High":"103.019997","Low":"101.269997","Close":"102.470001","Volume":"94623900","Adj_Close":"98.638758"},{"Symbol":"AAPL","Date":"2014-10-20","Open":"98.32","High":"99.959999","Low":"98.220001","Close":"99.760002","Volume":"77517300","Adj_Close":"96.030083"},{"Symbol":"AAPL","Date":"2014-10-17","Open":"97.50","High":"99.00","Low":"96.809998","Close":"97.669998","Volume":"68179700","Adj_Close":"94.018222"},{"Symbol":"AAPL","Date":"2014-10-16","Open":"95.550003","High":"97.720001","Low":"95.410004","Close":"96.260002","Volume":"72154500","Adj_Close":"92.660945"},{"Symbol":"AAPL","Date":"2014-10-15","Open":"97.970001","High":"99.150002","Low":"95.18","Close":"97.540001","Volume":"100933600","Adj_Close":"93.893086"},{"Symbol":"AAPL","Date":"2014-10-14","Open":"100.389999","High":"100.519997","Low":"98.57","Close":"98.75","Volume":"63688600","Adj_Close":"95.057844"},{"Symbol":"AAPL","Date":"2014-10-13","Open":"101.330002","High":"101.779999","Low":"99.809998","Close":"99.809998","Volume":"53583400","Adj_Close":"96.078209"},{"Symbol":"AAPL","Date":"2014-10-10","Open":"100.690002","High":"102.029999","Low":"100.300003","Close":"100.730003","Volume":"66331600","Adj_Close":"96.963817"},{"Symbol":"AAPL","Date":"2014-10-09","Open":"101.540001","High":"102.379997","Low":"100.610001","Close":"101.019997","Volume":"77376500","Adj_Close":"97.242968"},{"Symbol":"AAPL","Date":"2014-10-08","Open":"98.760002","High":"101.110001","Low":"98.309998","Close":"100.800003","Volume":"57404700","Adj_Close":"97.0312"},{"Symbol":"AAPL","Date":"2014-10-07","Open":"99.43","High":"100.120003","Low":"98.730003","Close":"98.75","Volume":"42094200","Adj_Close":"95.057844"},{"Symbol":"AAPL","Date":"2014-10-06","Open":"99.949997","High":"100.650002","Low":"99.419998","Close":"99.620003","Volume":"37051200","Adj_Close":"95.895318"},{"Symbol":"AAPL","Date":"2014-10-03","Open":"99.440002","High":"100.209999","Low":"99.040001","Close":"99.620003","Volume":"43469600","Adj_Close":"95.895318"},{"Symbol":"AAPL","Date":"2014-10-02","Open":"99.269997","High":"100.220001","Low":"98.040001","Close":"99.900002","Volume":"47757800","Adj_Close":"96.164848"},{"Symbol":"AAPL","Date":"2014-10-01","Open":"100.589996","High":"100.690002","Low":"98.699997","Close":"99.18","Volume":"51491300","Adj_Close":"95.471767"},{"Symbol":"AAPL","Date":"2014-09-30","Open":"100.809998","High":"101.540001","Low":"100.529999","Close":"100.75","Volume":"55264100","Adj_Close":"96.983066"},{"Symbol":"AAPL","Date":"2014-09-29","Open":"98.650002","High":"100.440002","Low":"98.629997","Close":"100.110001","Volume":"49766300","Adj_Close":"96.366996"},{"Symbol":"AAPL","Date":"2014-09-26","Open":"98.529999","High":"100.75","Low":"98.400002","Close":"100.75","Volume":"62370500","Adj_Close":"96.983066"},{"Symbol":"AAPL","Date":"2014-09-25","Open":"100.510002","High":"100.709999","Low":"97.720001","Close":"97.870003","Volume":"100092000","Adj_Close":"94.210749"},{"Symbol":"AAPL","Date":"2014-09-24","Open":"102.160004","High":"102.849998","Low":"101.199997","Close":"101.75","Volume":"60171800","Adj_Close":"97.945677"},{"Symbol":"AAPL","Date":"2014-09-23","Open":"100.599998","High":"102.940002","Low":"100.540001","Close":"102.639999","Volume":"63402200","Adj_Close":"98.802401"},{"Symbol":"AAPL","Date":"2014-09-22","Open":"101.800003","High":"102.139999","Low":"100.580002","Close":"101.059998","Volume":"52788400","Adj_Close":"97.281473"},{"Symbol":"AAPL","Date":"2014-09-19","Open":"102.290001","High":"102.349998","Low":"100.50","Close":"100.959999","Volume":"70902400","Adj_Close":"97.185214"},{"Symbol":"AAPL","Date":"2014-09-18","Open":"101.93","High":"102.349998","Low":"101.559998","Close":"101.790001","Volume":"37299400","Adj_Close":"97.984183"},{"Symbol":"AAPL","Date":"2014-09-17","Open":"101.269997","High":"101.800003","Low":"100.589996","Close":"101.580002","Volume":"60926500","Adj_Close":"97.782035"},{"Symbol":"AAPL","Date":"2014-09-16","Open":"99.800003","High":"101.260002","Low":"98.889999","Close":"100.860001","Volume":"66908100","Adj_Close":"97.088954"},{"Symbol":"AAPL","Date":"2014-09-15","Open":"102.809998","High":"103.050003","Low":"101.440002","Close":"101.629997","Volume":"61316500","Adj_Close":"97.830161"},{"Symbol":"AAPL","Date":"2014-09-12","Open":"101.209999","High":"102.190002","Low":"101.080002","Close":"101.660004","Volume":"62626100","Adj_Close":"97.859046"},{"Symbol":"AAPL","Date":"2014-09-11","Open":"100.410004","High":"101.440002","Low":"99.620003","Close":"101.43","Volume":"62353100","Adj_Close":"97.637642"},{"Symbol":"AAPL","Date":"2014-09-10","Open":"98.010002","High":"101.110001","Low":"97.760002","Close":"101.00","Volume":"100869600","Adj_Close":"97.223719"},{"Symbol":"AAPL","Date":"2014-09-09","Open":"99.080002","High":"103.080002","Low":"96.139999","Close":"97.989998","Volume":"189846300","Adj_Close":"94.326258"},{"Symbol":"AAPL","Date":"2014-09-08","Open":"99.300003","High":"99.309998","Low":"98.050003","Close":"98.360001","Volume":"46356700","Adj_Close":"94.682426"},{"Symbol":"AAPL","Date":"2014-09-05","Open":"98.800003","High":"99.389999","Low":"98.309998","Close":"98.970001","Volume":"58457000","Adj_Close":"95.26962"},{"Symbol":"AAPL","Date":"2014-09-04","Open":"98.849998","High":"100.089996","Low":"97.790001","Close":"98.120003","Volume":"85718000","Adj_Close":"94.451402"},{"Symbol":"AAPL","Date":"2014-09-03","Open":"103.099998","High":"103.199997","Low":"98.580002","Close":"98.940002","Volume":"125421000","Adj_Close":"95.240743"},{"Symbol":"AAPL","Date":"2014-09-02","Open":"103.059998","High":"103.739998","Low":"102.720001","Close":"103.300003","Volume":"53564000","Adj_Close":"99.437727"},{"Symbol":"AAPL","Date":"2014-08-29","Open":"102.860001","High":"102.900002","Low":"102.199997","Close":"102.50","Volume":"44595000","Adj_Close":"98.667636"},{"Symbol":"AAPL","Date":"2014-08-28","Open":"101.589996","High":"102.779999","Low":"101.559998","Close":"102.25","Volume":"68460000","Adj_Close":"98.426983"},{"Symbol":"AAPL","Date":"2014-08-27","Open":"101.019997","High":"102.57","Low":"100.699997","Close":"102.129997","Volume":"52369000","Adj_Close":"98.311467"},{"Symbol":"AAPL","Date":"2014-08-26","Open":"101.419998","High":"101.50","Low":"100.860001","Close":"100.889999","Volume":"33152000","Adj_Close":"97.117831"},{"Symbol":"AAPL","Date":"2014-08-25","Open":"101.790001","High":"102.169998","Low":"101.279999","Close":"101.540001","Volume":"40270000","Adj_Close":"97.74353"},{"Symbol":"AAPL","Date":"2014-08-22","Open":"100.290001","High":"101.470001","Low":"100.190002","Close":"101.32","Volume":"44184000","Adj_Close":"97.531754"},{"Symbol":"AAPL","Date":"2014-08-21","Open":"100.57","High":"100.940002","Low":"100.110001","Close":"100.580002","Volume":"33478000","Adj_Close":"96.819424"},{"Symbol":"AAPL","Date":"2014-08-20","Open":"100.440002","High":"101.089996","Low":"99.949997","Close":"100.57","Volume":"52699000","Adj_Close":"96.809796"},{"Symbol":"AAPL","Date":"2014-08-19","Open":"99.410004","High":"100.68","Low":"99.32","Close":"100.529999","Volume":"69399000","Adj_Close":"96.771291"},{"Symbol":"AAPL","Date":"2014-08-18","Open":"98.489998","High":"99.370003","Low":"97.980003","Close":"99.160004","Volume":"47572000","Adj_Close":"95.452518"},{"Symbol":"AAPL","Date":"2014-08-15","Open":"97.900002","High":"98.190002","Low":"96.860001","Close":"97.980003","Volume":"48951000","Adj_Close":"94.316637"},{"Symbol":"AAPL","Date":"2014-08-14","Open":"97.330002","High":"97.57","Low":"96.800003","Close":"97.50","Volume":"28116000","Adj_Close":"93.85458"},{"Symbol":"AAPL","Date":"2014-08-13","Open":"96.150002","High":"97.239998","Low":"96.040001","Close":"97.239998","Volume":"31916000","Adj_Close":"93.604299"},{"Symbol":"AAPL","Date":"2014-08-12","Open":"96.040001","High":"96.879997","Low":"95.610001","Close":"95.970001","Volume":"33795000","Adj_Close":"92.381786"},{"Symbol":"AAPL","Date":"2014-08-11","Open":"95.269997","High":"96.080002","Low":"94.839996","Close":"95.989998","Volume":"36585000","Adj_Close":"92.401035"},{"Symbol":"AAPL","Date":"2014-08-08","Open":"94.260002","High":"94.82","Low":"93.279999","Close":"94.739998","Volume":"41865000","Adj_Close":"91.197772"},{"Symbol":"AAPL","Date":"2014-08-07","Open":"94.93","High":"95.949997","Low":"94.099998","Close":"94.480003","Volume":"46711000","Adj_Close":"90.947498"},{"Symbol":"AAPL","Date":"2014-08-06","Open":"94.75","High":"95.480003","Low":"94.709999","Close":"94.959999","Volume":"38558000","Adj_Close":"90.957116"},{"Symbol":"AAPL","Date":"2014-08-05","Open":"95.360001","High":"95.68","Low":"94.360001","Close":"95.120003","Volume":"55933000","Adj_Close":"91.110375"},{"Symbol":"AAPL","Date":"2014-08-04","Open":"96.370003","High":"96.580002","Low":"95.169998","Close":"95.589996","Volume":"39958000","Adj_Close":"91.560557"},{"Symbol":"AAPL","Date":"2014-08-01","Open":"94.900002","High":"96.620003","Low":"94.809998","Close":"96.129997","Volume":"48511000","Adj_Close":"92.077795"},{"Symbol":"AAPL","Date":"2014-07-31","Open":"97.160004","High":"97.449997","Low":"95.330002","Close":"95.599998","Volume":"56843000","Adj_Close":"91.570137"},{"Symbol":"AAPL","Date":"2014-07-30","Open":"98.440002","High":"98.699997","Low":"97.669998","Close":"98.150002","Volume":"33010000","Adj_Close":"94.012649"},{"Symbol":"AAPL","Date":"2014-07-29","Open":"99.330002","High":"99.440002","Low":"98.25","Close":"98.379997","Volume":"43143000","Adj_Close":"94.23295"},{"Symbol":"AAPL","Date":"2014-07-28","Open":"97.82","High":"99.239998","Low":"97.550003","Close":"99.019997","Volume":"55318000","Adj_Close":"94.845971"},{"Symbol":"AAPL","Date":"2014-07-25","Open":"96.849998","High":"97.839996","Low":"96.639999","Close":"97.669998","Volume":"43469000","Adj_Close":"93.55288"},{"Symbol":"AAPL","Date":"2014-07-24","Open":"97.040001","High":"97.32","Low":"96.419998","Close":"97.029999","Volume":"45729000","Adj_Close":"92.939858"},{"Symbol":"AAPL","Date":"2014-07-23","Open":"95.419998","High":"97.879997","Low":"95.169998","Close":"97.190002","Volume":"92918000","Adj_Close":"93.093117"},{"Symbol":"AAPL","Date":"2014-07-22","Open":"94.68","High":"94.889999","Low":"94.120003","Close":"94.720001","Volume":"55197000","Adj_Close":"90.727235"},{"Symbol":"AAPL","Date":"2014-07-21","Open":"94.989998","High":"95.00","Low":"93.720001","Close":"93.940002","Volume":"39079000","Adj_Close":"89.980116"},{"Symbol":"AAPL","Date":"2014-07-18","Open":"93.620003","High":"94.739998","Low":"93.019997","Close":"94.43","Volume":"49988000","Adj_Close":"90.449459"},{"Symbol":"AAPL","Date":"2014-07-17","Open":"95.029999","High":"95.279999","Low":"92.57","Close":"93.089996","Volume":"57298000","Adj_Close":"89.16594"},{"Symbol":"AAPL","Date":"2014-07-16","Open":"96.970001","High":"97.099998","Low":"94.739998","Close":"94.779999","Volume":"53396300","Adj_Close":"90.784704"},{"Symbol":"AAPL","Date":"2014-07-15","Open":"96.800003","High":"96.849998","Low":"95.029999","Close":"95.32","Volume":"45477900","Adj_Close":"91.301942"},{"Symbol":"AAPL","Date":"2014-07-14","Open":"95.860001","High":"96.889999","Low":"95.650002","Close":"96.449997","Volume":"42810000","Adj_Close":"92.384306"},{"Symbol":"AAPL","Date":"2014-07-11","Open":"95.360001","High":"95.889999","Low":"94.860001","Close":"95.220001","Volume":"34018000","Adj_Close":"91.206158"},{"Symbol":"AAPL","Date":"2014-07-10","Open":"93.760002","High":"95.550003","Low":"93.519997","Close":"95.040001","Volume":"39686000","Adj_Close":"91.033746"},{"Symbol":"AAPL","Date":"2014-07-09","Open":"95.440002","High":"95.949997","Low":"94.760002","Close":"95.389999","Volume":"36436000","Adj_Close":"91.368991"},{"Symbol":"AAPL","Date":"2014-07-08","Open":"96.269997","High":"96.800003","Low":"93.919998","Close":"95.349998","Volume":"65222000","Adj_Close":"91.330676"},{"Symbol":"AAPL","Date":"2014-07-07","Open":"94.139999","High":"95.989998","Low":"94.099998","Close":"95.970001","Volume":"56468000","Adj_Close":"91.924543"},{"Symbol":"AAPL","Date":"2014-07-03","Open":"93.669998","High":"94.099998","Low":"93.199997","Close":"94.029999","Volume":"22891800","Adj_Close":"90.066319"},{"Symbol":"AAPL","Date":"2014-07-02","Open":"93.870003","High":"94.059998","Low":"93.089996","Close":"93.480003","Volume":"28465000","Adj_Close":"89.539507"},{"Symbol":"AAPL","Date":"2014-07-01","Open":"93.519997","High":"94.07","Low":"93.129997","Close":"93.519997","Volume":"38223000","Adj_Close":"89.577815"},{"Symbol":"AAPL","Date":"2014-06-30","Open":"92.099998","High":"93.730003","Low":"92.089996","Close":"92.93","Volume":"49482300","Adj_Close":"89.012689"},{"Symbol":"AAPL","Date":"2014-06-27","Open":"90.82","High":"92.00","Low":"90.769997","Close":"91.980003","Volume":"64029000","Adj_Close":"88.102737"},{"Symbol":"AAPL","Date":"2014-06-26","Open":"90.370003","High":"91.050003","Low":"89.800003","Close":"90.900002","Volume":"32629000","Adj_Close":"87.068261"},{"Symbol":"AAPL","Date":"2014-06-25","Open":"90.209999","High":"90.699997","Low":"89.650002","Close":"90.360001","Volume":"36869000","Adj_Close":"86.551023"},{"Symbol":"AAPL","Date":"2014-06-24","Open":"90.75","High":"91.739998","Low":"90.190002","Close":"90.279999","Volume":"39036000","Adj_Close":"86.474394"},{"Symbol":"AAPL","Date":"2014-06-23","Open":"91.32","High":"91.620003","Low":"90.599998","Close":"90.830002","Volume":"43694000","Adj_Close":"87.001212"},{"Symbol":"AAPL","Date":"2014-06-20","Open":"91.849998","High":"92.550003","Low":"90.900002","Close":"90.910004","Volume":"100898000","Adj_Close":"87.077842"},{"Symbol":"AAPL","Date":"2014-06-19","Open":"92.290001","High":"92.300003","Low":"91.339996","Close":"91.860001","Volume":"35528000","Adj_Close":"87.987793"},{"Symbol":"AAPL","Date":"2014-06-18","Open":"92.269997","High":"92.290001","Low":"91.349998","Close":"92.18","Volume":"33514000","Adj_Close":"88.294304"},{"Symbol":"AAPL","Date":"2014-06-17","Open":"92.309998","High":"92.699997","Low":"91.800003","Close":"92.080002","Volume":"29726000","Adj_Close":"88.198521"},{"Symbol":"AAPL","Date":"2014-06-16","Open":"91.510002","High":"92.75","Low":"91.449997","Close":"92.199997","Volume":"35561000","Adj_Close":"88.313457"},{"Symbol":"AAPL","Date":"2014-06-13","Open":"92.199997","High":"92.440002","Low":"90.879997","Close":"91.279999","Volume":"54525000","Adj_Close":"87.43224"},{"Symbol":"AAPL","Date":"2014-06-12","Open":"94.040001","High":"94.120003","Low":"91.900002","Close":"92.290001","Volume":"54749000","Adj_Close":"88.399667"},{"Symbol":"AAPL","Date":"2014-06-11","Open":"94.129997","High":"94.760002","Low":"93.470001","Close":"93.860001","Volume":"45681000","Adj_Close":"89.903486"},{"Symbol":"AAPL","Date":"2014-06-10","Open":"94.730003","High":"95.050003","Low":"93.57","Close":"94.25","Volume":"62777000","Adj_Close":"90.277046"},{"Symbol":"AAPL","Date":"2014-06-09","Open":"92.699997","High":"93.879997","Low":"91.75","Close":"93.699997","Volume":"75415000","Adj_Close":"89.750227"},{"Symbol":"AAPL","Date":"2014-06-06","Open":"649.900002","High":"651.259979","Low":"644.470024","Close":"645.570023","Volume":"87484600","Adj_Close":"88.336725"},{"Symbol":"AAPL","Date":"2014-06-05","Open":"646.199997","High":"649.370003","Low":"642.610008","Close":"647.349983","Volume":"75951400","Adj_Close":"88.580287"},{"Symbol":"AAPL","Date":"2014-06-04","Open":"637.44001","High":"647.890022","Low":"636.109993","Close":"644.819992","Volume":"83870500","Adj_Close":"88.234095"},{"Symbol":"AAPL","Date":"2014-06-03","Open":"628.459991","High":"638.740013","Low":"628.25","Close":"637.539986","Volume":"73177300","Adj_Close":"87.237933"},{"Symbol":"AAPL","Date":"2014-06-02","Open":"633.959984","High":"634.830017","Low":"622.500015","Close":"628.650009","Volume":"92337700","Adj_Close":"86.021471"},{"Symbol":"AAPL","Date":"2014-05-30","Open":"637.979996","High":"644.169991","Low":"628.900002","Close":"633.000015","Volume":"141005200","Adj_Close":"86.616706"},{"Symbol":"AAPL","Date":"2014-05-29","Open":"627.849991","High":"636.87001","Low":"627.769989","Close":"635.37999","Volume":"94118500","Adj_Close":"86.94237"},{"Symbol":"AAPL","Date":"2014-05-28","Open":"626.019989","High":"629.830009","Low":"623.779991","Close":"624.01001","Volume":"78870400","Adj_Close":"85.386556"},{"Symbol":"AAPL","Date":"2014-05-27","Open":"615.879997","High":"625.859985","Low":"615.630005","Close":"625.63002","Volume":"87216500","Adj_Close":"85.608231"},{"Symbol":"AAPL","Date":"2014-05-23","Open":"607.25","High":"614.730011","Low":"606.470009","Close":"614.129997","Volume":"58052400","Adj_Close":"84.034622"},{"Symbol":"AAPL","Date":"2014-05-22","Open":"606.599998","High":"609.850006","Low":"604.100021","Close":"607.269974","Volume":"50190000","Adj_Close":"83.095929"},{"Symbol":"AAPL","Date":"2014-05-21","Open":"603.830002","High":"606.699974","Low":"602.059975","Close":"606.310005","Volume":"49214900","Adj_Close":"82.964572"},{"Symbol":"AAPL","Date":"2014-05-20","Open":"604.510017","High":"606.399994","Low":"600.730011","Close":"604.710022","Volume":"58709000","Adj_Close":"82.745638"},{"Symbol":"AAPL","Date":"2014-05-19","Open":"597.849998","High":"607.330002","Low":"597.329987","Close":"604.590019","Volume":"79438800","Adj_Close":"82.729217"},{"Symbol":"AAPL","Date":"2014-05-16","Open":"588.629974","High":"597.529991","Low":"585.399994","Close":"597.510017","Volume":"69064100","Adj_Close":"81.760423"},{"Symbol":"AAPL","Date":"2014-05-15","Open":"594.70002","High":"596.599983","Low":"588.040001","Close":"588.819992","Volume":"57711500","Adj_Close":"80.571322"},{"Symbol":"AAPL","Date":"2014-05-14","Open":"592.430008","High":"597.400002","Low":"591.740005","Close":"593.869987","Volume":"41601000","Adj_Close":"81.262339"},{"Symbol":"AAPL","Date":"2014-05-13","Open":"591.999985","High":"594.540016","Low":"590.699982","Close":"593.760025","Volume":"39934300","Adj_Close":"81.247292"},{"Symbol":"AAPL","Date":"2014-05-12","Open":"587.489975","High":"593.659996","Low":"587.399986","Close":"592.830017","Volume":"53302200","Adj_Close":"81.120034"},{"Symbol":"AAPL","Date":"2014-05-09","Open":"584.540001","High":"586.25","Low":"580.330025","Close":"585.540024","Volume":"72899400","Adj_Close":"80.122506"},{"Symbol":"AAPL","Date":"2014-05-08","Open":"588.249992","High":"594.410027","Low":"586.400017","Close":"587.990013","Volume":"57574300","Adj_Close":"80.457751"},{"Symbol":"AAPL","Date":"2014-05-07","Open":"595.249992","High":"597.289986","Low":"587.72998","Close":"592.329979","Volume":"70716100","Adj_Close":"80.601425"},{"Symbol":"AAPL","Date":"2014-05-06","Open":"601.799995","High":"604.409988","Low":"594.410027","Close":"594.410027","Volume":"93641100","Adj_Close":"80.884468"},{"Symbol":"AAPL","Date":"2014-05-05","Open":"590.140022","High":"600.999977","Low":"589.999992","Close":"600.959976","Volume":"71766800","Adj_Close":"81.775753"},{"Symbol":"AAPL","Date":"2014-05-02","Open":"592.340019","High":"594.199982","Low":"589.709999","Close":"592.580025","Volume":"47878600","Adj_Close":"80.63545"},{"Symbol":"AAPL","Date":"2014-05-01","Open":"591.999985","High":"594.799995","Low":"586.360016","Close":"591.480026","Volume":"61012000","Adj_Close":"80.485767"},{"Symbol":"AAPL","Date":"2014-04-30","Open":"592.639999","High":"599.430008","Low":"589.799988","Close":"590.089981","Volume":"114160200","Adj_Close":"80.296616"},{"Symbol":"AAPL","Date":"2014-04-29","Open":"593.739998","High":"595.979996","Low":"589.509995","Close":"592.329979","Volume":"84344400","Adj_Close":"80.601425"},{"Symbol":"AAPL","Date":"2014-04-28","Open":"572.800026","High":"595.749977","Low":"572.54998","Close":"594.090019","Volume":"167371400","Adj_Close":"80.840922"},{"Symbol":"AAPL","Date":"2014-04-25","Open":"564.529984","High":"571.990021","Low":"563.959984","Close":"571.93998","Volume":"97568800","Adj_Close":"77.826851"},{"Symbol":"AAPL","Date":"2014-04-24","Open":"568.210014","High":"570.000015","Low":"560.730003","Close":"567.770004","Volume":"189977900","Adj_Close":"77.259421"},{"Symbol":"AAPL","Date":"2014-04-23","Open":"529.060013","High":"531.13002","Low":"524.449974","Close":"524.750008","Volume":"98735000","Adj_Close":"71.405466"},{"Symbol":"AAPL","Date":"2014-04-22","Open":"528.309982","High":"531.830009","Low":"526.500008","Close":"531.70002","Volume":"50640800","Adj_Close":"72.35119"},{"Symbol":"AAPL","Date":"2014-04-21","Open":"525.339981","High":"532.139977","Low":"523.959976","Close":"531.170021","Volume":"45637200","Adj_Close":"72.279071"},{"Symbol":"AAPL","Date":"2014-04-17","Open":"519.999992","High":"527.76001","Low":"519.199974","Close":"524.940025","Volume":"71083600","Adj_Close":"71.431323"},{"Symbol":"AAPL","Date":"2014-04-16","Open":"518.049988","High":"521.090004","Low":"514.139992","Close":"519.01001","Volume":"53691400","Adj_Close":"70.624395"},{"Symbol":"AAPL","Date":"2014-04-15","Open":"520.270012","High":"521.639977","Low":"511.329994","Close":"517.959999","Volume":"66622500","Adj_Close":"70.481514"},{"Symbol":"AAPL","Date":"2014-04-14","Open":"521.900009","High":"522.159988","Low":"517.210022","Close":"521.679977","Volume":"51418500","Adj_Close":"70.987711"},{"Symbol":"AAPL","Date":"2014-04-11","Open":"519.000023","High":"522.830017","Low":"517.140007","Close":"519.610023","Volume":"67929400","Adj_Close":"70.706042"},{"Symbol":"AAPL","Date":"2014-04-10","Open":"530.680023","High":"532.240005","Low":"523.169998","Close":"523.480019","Volume":"59913000","Adj_Close":"71.232652"},{"Symbol":"AAPL","Date":"2014-04-09","Open":"522.639999","High":"530.490005","Low":"522.020012","Close":"530.320015","Volume":"51542400","Adj_Close":"72.163406"},{"Symbol":"AAPL","Date":"2014-04-08","Open":"525.190018","High":"526.120026","Low":"518.699989","Close":"523.440018","Volume":"60972100","Adj_Close":"71.227209"},{"Symbol":"AAPL","Date":"2014-04-07","Open":"528.019989","High":"530.900002","Low":"521.890022","Close":"523.469978","Volume":"72462600","Adj_Close":"71.231286"},{"Symbol":"AAPL","Date":"2014-04-04","Open":"539.810005","High":"540.000023","Low":"530.579994","Close":"531.820023","Volume":"68812800","Adj_Close":"72.36752"},{"Symbol":"AAPL","Date":"2014-04-03","Open":"541.390015","High":"542.50","Low":"537.640022","Close":"538.790009","Volume":"40586000","Adj_Close":"73.315962"},{"Symbol":"AAPL","Date":"2014-04-02","Open":"542.379997","High":"543.479996","Low":"540.260002","Close":"542.549988","Volume":"45105200","Adj_Close":"73.827602"},{"Symbol":"AAPL","Date":"2014-04-01","Open":"537.760025","High":"541.870026","Low":"536.769989","Close":"541.649994","Volume":"50190000","Adj_Close":"73.705135"},{"Symbol":"AAPL","Date":"2014-03-31","Open":"539.230019","High":"540.809975","Low":"535.930023","Close":"536.739975","Volume":"42167300","Adj_Close":"73.037003"},{"Symbol":"AAPL","Date":"2014-03-28","Open":"538.319984","High":"538.940025","Low":"534.249985","Close":"536.859978","Volume":"50141000","Adj_Close":"73.053333"},{"Symbol":"AAPL","Date":"2014-03-27","Open":"540.019997","High":"541.499977","Low":"535.120018","Close":"537.459991","Volume":"55507900","Adj_Close":"73.13498"},{"Symbol":"AAPL","Date":"2014-03-26","Open":"546.520012","High":"549.000015","Low":"538.860023","Close":"539.779991","Volume":"74942000","Adj_Close":"73.450674"},{"Symbol":"AAPL","Date":"2014-03-25","Open":"541.499977","High":"545.750008","Low":"539.589973","Close":"544.98999","Volume":"70573300","Adj_Close":"74.159626"},{"Symbol":"AAPL","Date":"2014-03-24","Open":"538.420013","High":"540.500008","Low":"535.05999","Close":"539.190018","Volume":"88925200","Adj_Close":"73.370393"},{"Symbol":"AAPL","Date":"2014-03-21","Open":"531.929985","High":"533.75","Low":"526.330017","Close":"532.86998","Volume":"93511600","Adj_Close":"72.510393"},{"Symbol":"AAPL","Date":"2014-03-20","Open":"529.889992","High":"532.669975","Low":"527.350014","Close":"528.700005","Volume":"52099600","Adj_Close":"71.942963"},{"Symbol":"AAPL","Date":"2014-03-19","Open":"532.259979","High":"536.23999","Low":"528.999985","Close":"531.26001","Volume":"56189000","Adj_Close":"72.291316"},{"Symbol":"AAPL","Date":"2014-03-18","Open":"525.899994","High":"531.969986","Low":"525.200005","Close":"531.399986","Volume":"52411800","Adj_Close":"72.310363"},{"Symbol":"AAPL","Date":"2014-03-17","Open":"527.699982","High":"529.969994","Low":"525.850006","Close":"526.740013","Volume":"49886200","Adj_Close":"71.676256"},{"Symbol":"AAPL","Date":"2014-03-14","Open":"528.789993","High":"530.890015","Low":"523.000008","Close":"524.68998","Volume":"59299800","Adj_Close":"71.397298"},{"Symbol":"AAPL","Date":"2014-03-13","Open":"537.440018","High":"539.659988","Low":"529.159988","Close":"530.650009","Volume":"64435700","Adj_Close":"72.20831"},{"Symbol":"AAPL","Date":"2014-03-12","Open":"534.510017","High":"537.349976","Low":"532.00","Close":"536.609985","Volume":"49831600","Adj_Close":"73.019315"},{"Symbol":"AAPL","Date":"2014-03-11","Open":"535.450012","High":"538.740021","Low":"532.589973","Close":"536.089973","Volume":"69806100","Adj_Close":"72.948554"},{"Symbol":"AAPL","Date":"2014-03-10","Open":"528.360023","High":"533.330017","Low":"528.339996","Close":"530.919975","Volume":"44646000","Adj_Close":"72.245046"},{"Symbol":"AAPL","Date":"2014-03-07","Open":"531.090019","High":"531.980026","Low":"526.050011","Close":"530.440018","Volume":"55182400","Adj_Close":"72.179735"},{"Symbol":"AAPL","Date":"2014-03-06","Open":"532.789978","High":"534.440002","Low":"528.099991","Close":"530.749985","Volume":"46372200","Adj_Close":"72.221914"},{"Symbol":"AAPL","Date":"2014-03-05","Open":"530.919975","High":"534.750023","Low":"529.129974","Close":"532.360008","Volume":"50015700","Adj_Close":"72.440998"},{"Symbol":"AAPL","Date":"2014-03-04","Open":"530.999977","High":"532.640015","Low":"527.769997","Close":"531.239983","Volume":"64785000","Adj_Close":"72.288591"},{"Symbol":"AAPL","Date":"2014-03-03","Open":"523.419991","High":"530.650009","Low":"522.80999","Close":"527.76001","Volume":"59695300","Adj_Close":"71.815053"},{"Symbol":"AAPL","Date":"2014-02-28","Open":"529.079987","High":"532.749977","Low":"522.119987","Close":"526.239975","Volume":"92992200","Adj_Close":"71.608214"},{"Symbol":"AAPL","Date":"2014-02-27","Open":"517.140007","High":"528.780006","Low":"516.049995","Close":"527.670021","Volume":"75470500","Adj_Close":"71.802807"},{"Symbol":"AAPL","Date":"2014-02-26","Open":"523.610008","High":"525.00","Low":"515.599998","Close":"517.349998","Volume":"69054300","Adj_Close":"70.398508"},{"Symbol":"AAPL","Date":"2014-02-25","Open":"529.38002","High":"529.569984","Low":"521.000015","Close":"522.060013","Volume":"57988000","Adj_Close":"71.039424"},{"Symbol":"AAPL","Date":"2014-02-24","Open":"523.150024","High":"529.920006","Low":"522.420021","Close":"527.550018","Volume":"72227400","Adj_Close":"71.786478"},{"Symbol":"AAPL","Date":"2014-02-21","Open":"532.789978","High":"534.569992","Low":"524.599991","Close":"525.249992","Volume":"69696200","Adj_Close":"71.473502"},{"Symbol":"AAPL","Date":"2014-02-20","Open":"532.989983","High":"537.000008","Low":"528.999985","Close":"531.149994","Volume":"76464500","Adj_Close":"72.276345"},{"Symbol":"AAPL","Date":"2014-02-19","Open":"544.749985","High":"546.890007","Low":"534.350014","Close":"537.370003","Volume":"78442000","Adj_Close":"73.122734"},{"Symbol":"AAPL","Date":"2014-02-18","Open":"546.00","High":"551.190025","Low":"545.609978","Close":"545.990013","Volume":"65062900","Adj_Close":"74.295704"},{"Symbol":"AAPL","Date":"2014-02-14","Open":"542.469986","High":"545.980026","Low":"541.209984","Close":"543.990021","Volume":"68231100","Adj_Close":"74.023555"},{"Symbol":"AAPL","Date":"2014-02-13","Open":"534.659981","High":"544.850014","Low":"534.199997","Close":"544.429977","Volume":"76849500","Adj_Close":"74.083422"},{"Symbol":"AAPL","Date":"2014-02-12","Open":"536.95002","High":"539.560013","Low":"533.239975","Close":"535.919983","Volume":"77025200","Adj_Close":"72.925423"},{"Symbol":"AAPL","Date":"2014-02-11","Open":"530.610008","High":"537.749985","Low":"529.500023","Close":"535.959984","Volume":"70564200","Adj_Close":"72.930866"},{"Symbol":"AAPL","Date":"2014-02-10","Open":"518.659988","High":"531.990013","Low":"518.00","Close":"528.989998","Volume":"86389800","Adj_Close":"71.982424"},{"Symbol":"AAPL","Date":"2014-02-07","Open":"521.379997","High":"522.929993","Low":"517.380013","Close":"519.679985","Volume":"92570100","Adj_Close":"70.715562"},{"Symbol":"AAPL","Date":"2014-02-06","Open":"510.060005","High":"513.499977","Low":"507.81002","Close":"512.509995","Volume":"64441300","Adj_Close":"69.739904"},{"Symbol":"AAPL","Date":"2014-02-05","Open":"506.560005","High":"515.279991","Low":"506.249985","Close":"512.589996","Volume":"82086200","Adj_Close":"69.335766"},{"Symbol":"AAPL","Date":"2014-02-04","Open":"505.849976","High":"509.459991","Low":"502.760025","Close":"508.790016","Volume":"94170300","Adj_Close":"68.821759"},{"Symbol":"AAPL","Date":"2014-02-03","Open":"502.610008","High":"507.730019","Low":"499.300026","Close":"501.529984","Volume":"100366000","Adj_Close":"67.839727"},{"Symbol":"AAPL","Date":"2014-01-31","Open":"495.179985","High":"501.529984","Low":"493.549988","Close":"500.599976","Volume":"116199300","Adj_Close":"67.713929"},{"Symbol":"AAPL","Date":"2014-01-30","Open":"502.539993","High":"506.499977","Low":"496.70002","Close":"499.779984","Volume":"169625400","Adj_Close":"67.603012"},{"Symbol":"AAPL","Date":"2014-01-29","Open":"503.950012","High":"507.37001","Low":"498.62001","Close":"500.749992","Volume":"125702500","Adj_Close":"67.734221"},{"Symbol":"AAPL","Date":"2014-01-28","Open":"508.760002","High":"514.999985","Low":"502.070023","Close":"506.499977","Volume":"266380800","Adj_Close":"68.511996"},{"Symbol":"AAPL","Date":"2014-01-27","Open":"550.07","High":"554.799988","Low":"545.750008","Close":"550.500023","Volume":"138719700","Adj_Close":"74.463686"},{"Symbol":"AAPL","Date":"2014-01-24","Open":"554.000023","High":"555.61998","Low":"544.749985","Close":"546.070015","Volume":"107338700","Adj_Close":"73.864459"},{"Symbol":"AAPL","Date":"2014-01-23","Open":"549.94001","High":"556.50","Low":"544.810013","Close":"556.179993","Volume":"100809800","Adj_Close":"75.23199"},{"Symbol":"AAPL","Date":"2014-01-22","Open":"550.910019","High":"557.289978","Low":"547.809975","Close":"551.509979","Volume":"94996300","Adj_Close":"74.600299"},{"Symbol":"AAPL","Date":"2014-01-21","Open":"540.990005","High":"550.07","Low":"540.420006","Close":"549.069977","Volume":"82131700","Adj_Close":"74.27025"},{"Symbol":"AAPL","Date":"2014-01-17","Open":"551.480019","High":"552.069992","Low":"539.899994","Close":"540.669998","Volume":"106684900","Adj_Close":"73.134023"},{"Symbol":"AAPL","Date":"2014-01-16","Open":"554.900017","High":"556.850021","Low":"551.680023","Close":"554.250015","Volume":"57319500","Adj_Close":"74.970931"},{"Symbol":"AAPL","Date":"2014-01-15","Open":"553.520012","High":"560.200005","Low":"551.659996","Close":"557.359993","Volume":"97909700","Adj_Close":"75.391604"},{"Symbol":"AAPL","Date":"2014-01-14","Open":"538.220009","High":"546.730003","Low":"537.659996","Close":"546.390022","Volume":"83140400","Adj_Close":"73.907745"},{"Symbol":"AAPL","Date":"2014-01-13","Open":"529.910019","High":"542.50","Low":"529.880005","Close":"535.730019","Volume":"94623200","Adj_Close":"72.465814"},{"Symbol":"AAPL","Date":"2014-01-10","Open":"539.829979","High":"540.799988","Low":"531.109993","Close":"532.939995","Volume":"76244000","Adj_Close":"72.088419"},{"Symbol":"AAPL","Date":"2014-01-09","Open":"546.800018","High":"546.859993","Low":"535.349983","Close":"536.519997","Volume":"69787200","Adj_Close":"72.57267"},{"Symbol":"AAPL","Date":"2014-01-08","Open":"538.809982","High":"545.55999","Low":"538.68998","Close":"543.460022","Volume":"64632400","Adj_Close":"73.511417"},{"Symbol":"AAPL","Date":"2014-01-07","Open":"544.320015","High":"545.959999","Low":"537.919975","Close":"540.040024","Volume":"79302300","Adj_Close":"73.048809"},{"Symbol":"AAPL","Date":"2014-01-06","Open":"537.450005","High":"546.800018","Low":"533.599983","Close":"543.929993","Volume":"103152700","Adj_Close":"73.574988"},{"Symbol":"AAPL","Date":"2014-01-03","Open":"552.860023","High":"553.699989","Low":"540.429993","Close":"540.980019","Volume":"98116900","Adj_Close":"73.175958"},{"Symbol":"AAPL","Date":"2014-01-02","Open":"555.680008","High":"557.029999","Low":"552.020004","Close":"553.12999","Volume":"58671200","Adj_Close":"74.81943"}]}}} \ No newline at end of file diff --git a/index.html b/index.html index 90b7571..53db4c7 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,9 @@ + + + @@ -44,7 +47,8 @@ - + + diff --git a/js/app.js b/js/app.js index 44ab078..1986c11 100644 --- a/js/app.js +++ b/js/app.js @@ -1,6 +1,11 @@ "use strict"; var app = angular.module('stocks', ['ui.router']); +//lodash +app.factory('_', ['$window', function($window){ + return $window._; +}]); + //routes app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){ @@ -11,8 +16,8 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur url: '/fideligard', views: { 'stocksTicker':{ - templateUrl: 'js/templates/stocksTicker.html', - controller: "StocksCtrl" + templateUrl: 'js/templates/stocksTicker.html' + //controller: "StocksCtrl" }, 'dateSlider':{ templateUrl: 'js/templates/dateSlider.html', @@ -28,7 +33,10 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur }, stocks: function(StocksService){ return StocksService.all(); - } + }, + dates: ['stocks', 'StocksService', function(stocks, StocksService){ + return StocksService.getDateArr("AAPL"); + }] } }) diff --git a/js/controllers/dateCtrl.js b/js/controllers/dateCtrl.js index 3cccf55..2e8c5f2 100644 --- a/js/controllers/dateCtrl.js +++ b/js/controllers/dateCtrl.js @@ -1,15 +1,16 @@ "use strict"; -app.controller('DateCtrl', ["$scope", 'date', 'dateService', function($scope, date, dateService) { +app.controller('DateCtrl', ["$scope", 'date', 'dateService', 'dates', function($scope, date, dateService, dates) { $scope.editing = false; $scope.selectedDate = date; + $scope.dates = dates; $scope.setDate = function(day) { dateService.setDay(day); }; $scope.changeDate = function(date){ - dateService.setDate(date); + dateService.setDay(date); $scope.editing = !$scope.editing; }; diff --git a/js/services/dateService.js b/js/services/dateService.js index 7d87b5c..45ce17a 100644 --- a/js/services/dateService.js +++ b/js/services/dateService.js @@ -5,14 +5,8 @@ app.factory('dateService', function(){ var _date = {}; stub.setDay = function(day) { - var date = new Date(2014, 0); - var updatedDate = new Date(date.setDate(day)); - angular.copy({date: updatedDate}, _date) - }; - - stub.setDate = function(date){ - _date.date = date; - }; + _date.index = day; + }; stub.getDate = function(){ return _date; diff --git a/js/services/stocksService.js b/js/services/stocksService.js index b7cbba8..4d891eb 100644 --- a/js/services/stocksService.js +++ b/js/services/stocksService.js @@ -1,5 +1,5 @@ "use strict"; -app.factory('StocksService', ['$http', 'dateService', function($http, dateService){ +app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateService, _){ var _stocks = {}; var stub = {}; @@ -11,7 +11,7 @@ app.factory('StocksService', ['$http', 'dateService', function($http, dateServic method: "GET" }) .then(function(response){ - response.results.quote.forEach(function(stock) { + response.data.query.results.quote.forEach(function(stock) { _buildStockObject(stock); _buildDatesArr(stock); }); @@ -19,42 +19,49 @@ app.factory('StocksService', ['$http', 'dateService', function($http, dateServic }); }; - _buildStockObject = function(stock) { - if (_stock[stock.Symbol]) { - _stocks[stock.Symbol][stock.date] = stock; + var _buildStockObject = function(stock) { + if (_stocks[stock.Symbol]) { + _stocks[stock.Symbol][stock.Date] = stock; } else { _stocks[stock.Symbol] = {}; - _stock[stock.Symbol][stock.date] = stock; + _stocks[stock.Symbol][stock.Date] = stock; } - } + }; - _buildDatesArr = function(stock) { + var _buildDatesArr = function(stock) { if (_dates[stock.Symbol]) { - _dates[stock.Symbol].push(stock.date); + _dates[stock.Symbol].push(stock.Date); } else { - _dates[stock.Symbol] = [stock.date]; + _dates[stock.Symbol] = [stock.Date]; } - } + }; - var _sevenDayAverage = function() { + stub.getDateArr = function(symbol){ + console.log(_dates); + console.log(Object.keys(_dates)); + console.log(symbol); + return _dates[symbol]; + }; - } + // var _sevenDayAverage = function() { - var stub.thirtyDayAverage = function(symbol) { - var dates = Object.keys(_stocks[symbol]); - return dates; - } + // }; - var stub.currentPrice = function(symbol) { - return _stocks[symbol][dateService.getDate().date].close - } + // stub.thirtyDayAverage = function(symbol) { + // var dates = Object.keys(_stocks[symbol]); + // return dates; + // }; + + stub.currentPrice = function(symbol) { + return _stocks[symbol][dateService.getDate().date].close; + }; stub.all = function(){ - if(_stocks.length){ + if(!_.isEmpty(_stocks)){ return _stocks; } else{ - return _populateStocks(); + return _populateStock(); } }; diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index 1aa97b7..2f558a3 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,11 +1,11 @@
-

{{ selectedDate.date | date }}

+

{{ dates[selectedDate.index] }}

1/01/2014 - + 12/31/2014
From 62f4f92a848b429ed389157a6873503f9bbea824 Mon Sep 17 00:00:00 2001 From: Graham Turner Date: Thu, 29 Sep 2016 19:33:05 -0400 Subject: [PATCH 08/21] rounding --- index.html | 2 + js/app.js | 6 +-- js/controllers/stocksCtrl.js | 6 ++- js/directives/stockTicker.js | 14 +++++-- js/services/dateService.js | 2 +- js/services/stocksService.js | 73 ++++++++++++++++++++++++++-------- js/templates/stockTicker.html | 12 +++--- js/templates/stocksTicker.html | 2 +- 8 files changed, 83 insertions(+), 34 deletions(-) diff --git a/index.html b/index.html index 53db4c7..b4194ba 100644 --- a/index.html +++ b/index.html @@ -49,6 +49,8 @@ + + diff --git a/js/app.js b/js/app.js index 1986c11..cf84541 100644 --- a/js/app.js +++ b/js/app.js @@ -16,8 +16,8 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur url: '/fideligard', views: { 'stocksTicker':{ - templateUrl: 'js/templates/stocksTicker.html' - //controller: "StocksCtrl" + templateUrl: 'js/templates/stocksTicker.html', + controller: "StocksCtrl" }, 'dateSlider':{ templateUrl: 'js/templates/dateSlider.html', @@ -35,7 +35,7 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur return StocksService.all(); }, dates: ['stocks', 'StocksService', function(stocks, StocksService){ - return StocksService.getDateArr("AAPL"); + return StocksService.getDateCollection(); }] } diff --git a/js/controllers/stocksCtrl.js b/js/controllers/stocksCtrl.js index 4e07224..f8e0398 100644 --- a/js/controllers/stocksCtrl.js +++ b/js/controllers/stocksCtrl.js @@ -1,7 +1,9 @@ "use strict"; -app.controller('StocksCtrl', ["$scope", 'date', 'stocks', function($scope, date, stocks){ + +app.controller('StocksCtrl', ["$scope", 'date', 'stocks', 'dates', function($scope, date, stocks, dates){ $scope.selectedDate = date; $scope.stocks = stocks; + $scope.dates = dates; -}]); \ No newline at end of file +}]); diff --git a/js/directives/stockTicker.js b/js/directives/stockTicker.js index 6d7cd08..8d369f0 100644 --- a/js/directives/stockTicker.js +++ b/js/directives/stockTicker.js @@ -1,9 +1,15 @@ -app.directive('stockTicker', function(){ +app.directive('stockTicker', ['StocksService', function(StocksService) { return{ restrict: "E", templateUrl: 'js/templates/stockTicker.html', scope: { - stock: "=" - } + stock: "=", + symbol: "=" + }, + link: function(scope) { + scope.currentPrice = StocksService.currentPrice(scope.symbol); + scope.thirtyDay = StocksService.thirtyDayAverage(scope.symbol); + scope.sevenDay = StocksService.sevenDayAverage(scope.symbol); + } }; -}); \ No newline at end of file +}]); diff --git a/js/services/dateService.js b/js/services/dateService.js index 45ce17a..9f6bd0b 100644 --- a/js/services/dateService.js +++ b/js/services/dateService.js @@ -2,7 +2,7 @@ app.factory('dateService', function(){ var stub = {}; - var _date = {}; + var _date = {index: 100}; stub.setDay = function(day) { _date.index = day; diff --git a/js/services/stocksService.js b/js/services/stocksService.js index 4d891eb..6c34732 100644 --- a/js/services/stocksService.js +++ b/js/services/stocksService.js @@ -4,6 +4,8 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS var _stocks = {}; var stub = {}; var _dates = {}; + var _dateCollection = []; + var _stockDates = {}; var _populateStock = function(){ return $http({ @@ -14,7 +16,20 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS response.data.query.results.quote.forEach(function(stock) { _buildStockObject(stock); _buildDatesArr(stock); + _buildStockDates(stock); }); + var sortedDates = Object.keys(_dates).sort(function(a,b) { + var aDate = new Date(a); + var bDate = new Date(b); + if (aDate > bDate) { + return 1; + } else if (aDate < bDate) { + return -1; + } else { + return 0; + } + }) + angular.copy(sortedDates, _dateCollection) return _stocks; }); }; @@ -29,31 +44,57 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS }; var _buildDatesArr = function(stock) { - if (_dates[stock.Symbol]) { - _dates[stock.Symbol].push(stock.Date); + if (_dates[stock.Date]) { + _dates[stock.Date].push(stock.Symbol); } else { - _dates[stock.Symbol] = [stock.Date]; + _dates[stock.Date] = [stock.Symbol]; } }; - stub.getDateArr = function(symbol){ - console.log(_dates); - console.log(Object.keys(_dates)); - console.log(symbol); - return _dates[symbol]; - }; + var _buildStockDates = function(stock) { + if (_stockDates[stock.Symbol]) { + _stockDates[stock.Symbol].unshift(stock.Date); + } else { + _stockDates[stock.Symbol] = [stock.Date]; + } + } - // var _sevenDayAverage = function() { + stub.getDateCollection = function() { + return _dateCollection; + }; - // }; + stub.sevenDayAverage = function(symbol) { + var today; + for (var i = 0; i < _stockDates[symbol].length; i++) { + if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { + today = i; + break; + } + } + var avgPrice = 0; + for (var j = today - 6; j <= today; j++ ) { + avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); + } + return Math.round(avgPrice / 7 * 100) / 100; + }; - // stub.thirtyDayAverage = function(symbol) { - // var dates = Object.keys(_stocks[symbol]); - // return dates; - // }; + stub.thirtyDayAverage = function(symbol) { + var today; + for (var i = 0; i < _stockDates[symbol].length; i++) { + if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { + today = i; + break; + } + } + var avgPrice = 0; + for (var j = today - 29; j <= today; j++ ) { + avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); + } + return Math.round(avgPrice / 30 * 100) / 100; + }; stub.currentPrice = function(symbol) { - return _stocks[symbol][dateService.getDate().date].close; + return Math.round(_stocks[symbol][_dateCollection[dateService.getDate().index]].Close * 100) / 100; }; stub.all = function(){ diff --git a/js/templates/stockTicker.html b/js/templates/stockTicker.html index 1ef4594..efb2e62 100644 --- a/js/templates/stockTicker.html +++ b/js/templates/stockTicker.html @@ -1,8 +1,6 @@ - {{stock.symbol}} - - - - - - \ No newline at end of file + {{ symbol }} + {{ currentPrice }} + {{ sevenDay }} + {{ thirtyDay }} + diff --git a/js/templates/stocksTicker.html b/js/templates/stocksTicker.html index 84e62d7..652fdf9 100644 --- a/js/templates/stocksTicker.html +++ b/js/templates/stocksTicker.html @@ -1 +1 @@ - \ No newline at end of file + From b85dd7d9e6895698912b39eb8248ad710d1aa4a5 Mon Sep 17 00:00:00 2001 From: David Jiang Date: Thu, 29 Sep 2016 17:02:47 -0700 Subject: [PATCH 09/21] dding more stocks to the bunch --- js/directives/stockTicker.js | 9 ++++++++- js/services/stocksService.js | 29 ++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/js/directives/stockTicker.js b/js/directives/stockTicker.js index 8d369f0..f8ee100 100644 --- a/js/directives/stockTicker.js +++ b/js/directives/stockTicker.js @@ -1,4 +1,5 @@ -app.directive('stockTicker', ['StocksService', function(StocksService) { +"use strict"; +app.directive('stockTicker', ['StocksService', 'dateService', function(StocksService, dateService) { return{ restrict: "E", templateUrl: 'js/templates/stockTicker.html', @@ -7,6 +8,12 @@ app.directive('stockTicker', ['StocksService', function(StocksService) { symbol: "=" }, link: function(scope) { + scope.currentDate = dateService.getDate(); + scope.$watch('currentDate.index', function(){ + scope.currentPrice = StocksService.currentPrice(scope.symbol); + scope.thirtyDay = StocksService.thirtyDayAverage(scope.symbol); + scope.sevenDay = StocksService.sevenDayAverage(scope.symbol); + }); scope.currentPrice = StocksService.currentPrice(scope.symbol); scope.thirtyDay = StocksService.thirtyDayAverage(scope.symbol); scope.sevenDay = StocksService.sevenDayAverage(scope.symbol); diff --git a/js/services/stocksService.js b/js/services/stocksService.js index 6c34732..fff3dcd 100644 --- a/js/services/stocksService.js +++ b/js/services/stocksService.js @@ -7,9 +7,32 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS var _dateCollection = []; var _stockDates = {}; - var _populateStock = function(){ + var _stockSymbols = ['AAPL', 'GOOG', 'PHM', 'ICON', 'PCLN', 'PM', 'MO', 'GPOR', 'AREX', 'ATW', 'CMO', 'LTC', 'RNR', 'GILD']; + + var _populateAllStocks = function(){ + _stockSymbols.forEach(function(el){ + console.log(el); + _populateStock(el); + }); + }; + + var _buildStockString = function(symbol){ + var thing = 'http://query.yahooapis.com/v1/public/yql?q= ' + + 'select * from yahoo.finance.historicaldata ' + + 'where symbol = ' + '"' + symbol + '"' + ' ' + + 'and startDate = "2015-01-01" ' + + 'and endDate = "2015-12-31" ' + +'&format=json ' + + '&diagnostics=true ' + + '&env=store://datatables.org/alltableswithkeys ' + + '&callback='; + return thing; + }; + + var _populateStock = function(symbol){ + console.log(_buildStockString(symbol)); return $http({ - url: 'AAPL.json', + url: _buildStockString(symbol), method: "GET" }) .then(function(response){ @@ -102,7 +125,7 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS return _stocks; } else{ - return _populateStock(); + return _populateAllStocks(); } }; From 36dc060bf1cb9a2f865c86496d5662a898232dbf Mon Sep 17 00:00:00 2001 From: David Jiang Date: Fri, 30 Sep 2016 10:02:56 -0700 Subject: [PATCH 10/21] filter stock ticker and date input tied to ticker --- Notes.txt | 39 +++++++++++ index.html | 21 +++--- js/controllers/dateCtrl.js | 9 ++- js/controllers/stocksCtrl.js | 7 ++ js/directives/stockTicker.js | 13 ++-- js/filters/filters.js | 24 +++++++ js/services/stocksService.js | 121 +++++++++++++++++++-------------- js/templates/dateSlider.html | 6 +- js/templates/stockTicker.html | 8 ++- js/templates/stocksTicker.html | 17 ++++- 10 files changed, 189 insertions(+), 76 deletions(-) create mode 100644 Notes.txt create mode 100644 js/filters/filters.js diff --git a/Notes.txt b/Notes.txt new file mode 100644 index 0000000..7a01705 --- /dev/null +++ b/Notes.txt @@ -0,0 +1,39 @@ +_stocks: +{ + AAPL: { + 2015-01-02: { + Close: + }, + 2015-01-05: { + Close: + } + ... + }, + + AREX: { + + } + ... +} + + +_dates: +{ + 2015-01-02: [AAPL, AREX, ...], + 2015-01-05: [], + ... +} + +_dateCollection: +["2015-01-02", "2015-01-05", ...] + +_stockDates: +{ + AAPL: { + 0: "2015-01-02", + 1: "2015-01-05", + ... + }, + AREX:{} + ... +} \ No newline at end of file diff --git a/index.html b/index.html index b4194ba..436d6bd 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,15 @@ Fideligard + + - + - + - + @@ -24,17 +26,15 @@ Fideligard Historical Portfolio Simulator
- -
-
-
+
+
Loading...
-
+
@@ -46,11 +46,16 @@
+ + + + + diff --git a/js/controllers/dateCtrl.js b/js/controllers/dateCtrl.js index 2e8c5f2..6cbf4ea 100644 --- a/js/controllers/dateCtrl.js +++ b/js/controllers/dateCtrl.js @@ -10,11 +10,14 @@ app.controller('DateCtrl', ["$scope", 'date', 'dateService', 'dates', function($ }; $scope.changeDate = function(date){ - dateService.setDay(date); + var stringDate = date.toISOString().substring(0,10); + var dayOfYear = $scope.dates.indexOf(stringDate); + if(dayOfYear >= 0){ + dateService.setDay(dayOfYear); + $scope.newDate = dayOfYear; + } $scope.editing = !$scope.editing; }; - - //in order for the slider to follow when the date is manually changed, need to turn the date back into a day value and add that to the slider //make it more obvious that you can click on the date to change it }]); diff --git a/js/controllers/stocksCtrl.js b/js/controllers/stocksCtrl.js index f8e0398..05e0651 100644 --- a/js/controllers/stocksCtrl.js +++ b/js/controllers/stocksCtrl.js @@ -6,4 +6,11 @@ app.controller('StocksCtrl', ["$scope", 'date', 'stocks', 'dates', function($sco $scope.stocks = stocks; $scope.dates = dates; + $scope.sortBy = "symbol"; + $scope.sortTable = function(property){ + if(property == "symbol"){ + return "-symbol"; + } + }; + }]); diff --git a/js/directives/stockTicker.js b/js/directives/stockTicker.js index f8ee100..45af78b 100644 --- a/js/directives/stockTicker.js +++ b/js/directives/stockTicker.js @@ -1,22 +1,23 @@ "use strict"; app.directive('stockTicker', ['StocksService', 'dateService', function(StocksService, dateService) { return{ - restrict: "E", + restrict: "A", templateUrl: 'js/templates/stockTicker.html', scope: { - stock: "=", symbol: "=" }, link: function(scope) { scope.currentDate = dateService.getDate(); scope.$watch('currentDate.index', function(){ scope.currentPrice = StocksService.currentPrice(scope.symbol); - scope.thirtyDay = StocksService.thirtyDayAverage(scope.symbol); - scope.sevenDay = StocksService.sevenDayAverage(scope.symbol); + scope.thirtyDay = StocksService.priceChange(scope.symbol, 30); + scope.sevenDay = StocksService.priceChange(scope.symbol, 7); + scope.oneDay = StocksService.priceChange(scope.symbol, 1); }); scope.currentPrice = StocksService.currentPrice(scope.symbol); - scope.thirtyDay = StocksService.thirtyDayAverage(scope.symbol); - scope.sevenDay = StocksService.sevenDayAverage(scope.symbol); + scope.thirtyDay = StocksService.priceChange(scope.symbol, 30); + scope.sevenDay = StocksService.priceChange(scope.symbol, 7); + scope.oneDay = StocksService.priceChange(scope.symbol, 1); } }; }]); diff --git a/js/filters/filters.js b/js/filters/filters.js new file mode 100644 index 0000000..7561bcf --- /dev/null +++ b/js/filters/filters.js @@ -0,0 +1,24 @@ +"use strict"; +app.filter('myCurrency', function(){ + return function(amount){ + var output = "$" + Math.abs(amount).toFixed(2); + if(amount < 0){ + output = "-" + output; + } + else if(amount > 0){ + output = "+" + output; + } + + return output; + }; +}); + +app.filter('objToArray', function(){ + return function(stocks){ + var result = []; + for (var symbol in stocks){ + result.push(symbol); + } + return result; + }; +}); \ No newline at end of file diff --git a/js/services/stocksService.js b/js/services/stocksService.js index fff3dcd..f07e283 100644 --- a/js/services/stocksService.js +++ b/js/services/stocksService.js @@ -1,8 +1,8 @@ "use strict"; -app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateService, _){ +app.factory('StocksService', ['$http', 'dateService', '_', '$q', function($http, dateService, _, $q){ - var _stocks = {}; var stub = {}; + var _stocks = {}; var _dates = {}; var _dateCollection = []; var _stockDates = {}; @@ -10,9 +10,18 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS var _stockSymbols = ['AAPL', 'GOOG', 'PHM', 'ICON', 'PCLN', 'PM', 'MO', 'GPOR', 'AREX', 'ATW', 'CMO', 'LTC', 'RNR', 'GILD']; var _populateAllStocks = function(){ + var requests = []; _stockSymbols.forEach(function(el){ - console.log(el); - _populateStock(el); + requests.push(_populateStock(el)); + }); + return $q.all(requests).then(function(response){ + response.forEach(function(stock){ + _buildCollections(stock); + }); + _buildDateCollection(); + return _stocks; + }, function(error){ + console.log(error); }); }; @@ -30,31 +39,33 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS }; var _populateStock = function(symbol){ - console.log(_buildStockString(symbol)); return $http({ url: _buildStockString(symbol), method: "GET" - }) - .then(function(response){ - response.data.query.results.quote.forEach(function(stock) { - _buildStockObject(stock); - _buildDatesArr(stock); - _buildStockDates(stock); - }); - var sortedDates = Object.keys(_dates).sort(function(a,b) { - var aDate = new Date(a); - var bDate = new Date(b); - if (aDate > bDate) { - return 1; - } else if (aDate < bDate) { - return -1; - } else { - return 0; - } - }) - angular.copy(sortedDates, _dateCollection) - return _stocks; }); + }; + + var _buildCollections = function(response){ + response.data.query.results.quote.forEach(function(stock) { + _buildStockObject(stock); + _buildDatesArr(stock); + _buildStockDates(stock); + }); + }; + + var _buildDateCollection = function(){ + var sortedDates = Object.keys(_dates).sort(function(a,b) { + var aDate = new Date(a); + var bDate = new Date(b); + if (aDate > bDate) { + return 1; + } else if (aDate < bDate) { + return -1; + } else { + return 0; + } + }); + angular.copy(sortedDates, _dateCollection); }; var _buildStockObject = function(stock) { @@ -86,34 +97,40 @@ app.factory('StocksService', ['$http', 'dateService', '_', function($http, dateS return _dateCollection; }; - stub.sevenDayAverage = function(symbol) { - var today; - for (var i = 0; i < _stockDates[symbol].length; i++) { - if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { - today = i; - break; - } - } - var avgPrice = 0; - for (var j = today - 6; j <= today; j++ ) { - avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); - } - return Math.round(avgPrice / 7 * 100) / 100; - }; + // stub.sevenDayAverage = function(symbol) { + // var today; + // for (var i = 0; i < _stockDates[symbol].length; i++) { + // if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { + // today = i; + // break; + // } + // } + // var avgPrice = 0; + // for (var j = today - 6; j <= today; j++ ) { + // avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); + // } + // return Math.round(avgPrice / 7 * 100) / 100; + // }; - stub.thirtyDayAverage = function(symbol) { - var today; - for (var i = 0; i < _stockDates[symbol].length; i++) { - if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { - today = i; - break; - } - } - var avgPrice = 0; - for (var j = today - 29; j <= today; j++ ) { - avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); - } - return Math.round(avgPrice / 30 * 100) / 100; + // stub.thirtyDayAverage = function(symbol) { + // var today; + // for (var i = 0; i < _stockDates[symbol].length; i++) { + // if (_stockDates[symbol][i] === _dateCollection[dateService.getDate().index]) { + // today = i; + // break; + // } + // } + // var avgPrice = 0; + // for (var j = today - 29; j <= today; j++ ) { + // avgPrice += Number(_stocks[symbol][_stockDates[symbol][j]].Close); + // } + // return Math.round(avgPrice / 30 * 100) / 100; + // }; + + stub.priceChange = function(symbol, days){ + var date = _dateCollection[dateService.getDate().index - days]; + var thenPrice = Math.round(_stocks[symbol][date].Close * 100) / 100; + return Math.round((stub.currentPrice(symbol) - thenPrice) * 100) / 100; }; stub.currentPrice = function(symbol) { diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index 2f558a3..c3c7d56 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,11 +1,11 @@

{{ dates[selectedDate.index] }}

- + - 1/01/2014 + 1/01/2015 - 12/31/2014 + 12/31/2015
diff --git a/js/templates/stockTicker.html b/js/templates/stockTicker.html index efb2e62..3ca766c 100644 --- a/js/templates/stockTicker.html +++ b/js/templates/stockTicker.html @@ -1,6 +1,8 @@ {{ symbol }} - {{ currentPrice }} - {{ sevenDay }} - {{ thirtyDay }} + {{ currentPrice | currency }} + {{ oneDay | myCurrency }} + {{ sevenDay | myCurrency }} + {{ thirtyDay | myCurrency }} + trade diff --git a/js/templates/stocksTicker.html b/js/templates/stocksTicker.html index 652fdf9..7b2dcf9 100644 --- a/js/templates/stocksTicker.html +++ b/js/templates/stocksTicker.html @@ -1 +1,16 @@ - + + + + + + + + + + + + + +
Stocks
SymbolPrice1d7d30dTrade?
From 09bf28f7824b64d2824b086d1729b0df0e8d027a Mon Sep 17 00:00:00 2001 From: David Jiang Date: Fri, 30 Sep 2016 10:21:07 -0700 Subject: [PATCH 11/21] dates avoid out of bounds error --- js/directives/stockTicker.js | 12 ++++++------ js/templates/dateSlider.html | 11 +++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/js/directives/stockTicker.js b/js/directives/stockTicker.js index 45af78b..a40c5ad 100644 --- a/js/directives/stockTicker.js +++ b/js/directives/stockTicker.js @@ -8,16 +8,16 @@ app.directive('stockTicker', ['StocksService', 'dateService', function(StocksSer }, link: function(scope) { scope.currentDate = dateService.getDate(); - scope.$watch('currentDate.index', function(){ - scope.currentPrice = StocksService.currentPrice(scope.symbol); - scope.thirtyDay = StocksService.priceChange(scope.symbol, 30); - scope.sevenDay = StocksService.priceChange(scope.symbol, 7); - scope.oneDay = StocksService.priceChange(scope.symbol, 1); - }); + scope.getData = function(){ scope.currentPrice = StocksService.currentPrice(scope.symbol); scope.thirtyDay = StocksService.priceChange(scope.symbol, 30); scope.sevenDay = StocksService.priceChange(scope.symbol, 7); scope.oneDay = StocksService.priceChange(scope.symbol, 1); + }; + scope.$watch('currentDate.index', function(){ + scope.getData(); + }); + scope.getData(); } }; }]); diff --git a/js/templates/dateSlider.html b/js/templates/dateSlider.html index c3c7d56..ab21cc1 100644 --- a/js/templates/dateSlider.html +++ b/js/templates/dateSlider.html @@ -1,11 +1,10 @@
-

{{ dates[selectedDate.index] }}

- - +

Chosen Date: {{ dates[selectedDate.index] | date}}

+ + - - 1/01/2015 - + 02/17/2015 + 12/31/2015
From f3f75e4a3976f58ed87dfe41872eb4ada6a713db Mon Sep 17 00:00:00 2001 From: David Jiang Date: Fri, 30 Sep 2016 14:43:48 -0700 Subject: [PATCH 12/21] trade buying and selling --- index.html | 3 ++ js/app.js | 10 ++++- js/controllers/tradeCtrl.js | 6 +++ js/directives/tradeForm.js | 55 ++++++++++++++++++++++++++ js/services/accountService.js | 74 +++++++++++++++++++++++++++++++++++ js/templates/mainContent.html | 2 +- js/templates/stockTicker.html | 2 +- js/templates/trade.html | 3 +- js/templates/tradeForm.html | 34 ++++++++++++++++ 9 files changed, 184 insertions(+), 5 deletions(-) create mode 100644 js/controllers/tradeCtrl.js create mode 100644 js/directives/tradeForm.js create mode 100644 js/services/accountService.js create mode 100644 js/templates/tradeForm.html diff --git a/index.html b/index.html index 436d6bd..1cbe9a7 100644 --- a/index.html +++ b/index.html @@ -49,11 +49,14 @@ + + + diff --git a/js/app.js b/js/app.js index cf84541..edd083d 100644 --- a/js/app.js +++ b/js/app.js @@ -47,8 +47,14 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur }) .state('main.trade', { url: '/trade', - templateUrl: 'js/templates/trade.html', - controller: 'TradeCtrl' + params: {symbol: ''}, + views: { + 'mainContent@':{ + templateUrl: 'js/templates/trade.html', + controller: 'TradeCtrl' + } + } + }) .state('main.transactions', { url: '/transactions', diff --git a/js/controllers/tradeCtrl.js b/js/controllers/tradeCtrl.js new file mode 100644 index 0000000..428c16a --- /dev/null +++ b/js/controllers/tradeCtrl.js @@ -0,0 +1,6 @@ +"use strict"; +app.controller('TradeCtrl', ['$scope', 'dates', '$stateParams', function($scope, dates, $stateParams){ + + $scope.symbol = $stateParams.symbol; + $scope.dates = dates; +}]); \ No newline at end of file diff --git a/js/directives/tradeForm.js b/js/directives/tradeForm.js new file mode 100644 index 0000000..c812eb2 --- /dev/null +++ b/js/directives/tradeForm.js @@ -0,0 +1,55 @@ +"use strict"; +app.directive('tradeForm', ['StocksService', 'dateService', 'accountService', function(StocksService, dateService, accountService){ + + return{ + restrict: "E", + templateUrl: "js/templates/tradeForm.html", + scope: { + symbol: "=", + dates: "=" + }, + link: function(scope){ + scope.updateForm = function(){ + scope.formData.date = scope.dates[dateService.getDate().index]; + scope.formData.price = StocksService.currentPrice(scope.symbol); + }; + + scope.currentDate = dateService.getDate(); + scope.$watch('currentDate.index', function(){ + scope.updateForm(); + }); + + scope.account = accountService.getBalance(); + scope.orderStatus = ""; + + scope.formData = {}; + scope.updateForm(); + scope.formData.symbol = scope.symbol; + scope.formData.quantity = 100; + + scope.placeTrade = function(){ + if(scope.formData.action === "buy"){ + //check buy + if(accountService.checkValidBuy(scope.formData.quantity*scope.formData.price)){ + accountService.makeBuy(scope.formData.symbol, scope.formData.quantity, scope.formData.price); + scope.orderStatus = "Order Placed!"; + } + else{ + scope.orderStatus = "Not enough money!"; + } + } + else if(scope.formData.action === "sell"){ + //check sell + if(accountService.checkValidSell(scope.formData)){ + accountService.makeSell(scope.formData); + scope.orderStatus = "Sell confirmed!"; + } + else{ + scope.orderStatus = "Invalid"; + } + } + }; + + } + }; +}]); \ No newline at end of file diff --git a/js/services/accountService.js b/js/services/accountService.js new file mode 100644 index 0000000..3bf0197 --- /dev/null +++ b/js/services/accountService.js @@ -0,0 +1,74 @@ +"use strict"; +app.factory('accountService', function(){ + var stub = {}; + + var _account = { cash: 100000 }; + + var _transactions = []; + + var _portfolio = {}; + + stub.makeTransaction = function(amount){ + _account.cash -= amount; + }; + + stub.getBalance = function(){ + return _account; + }; + + stub.checkValidBuy = function(amount){ + return amount <= _account.cash; + }; + + stub.checkValidSell = function(formData){ + //check if stock is owned and enough shares + return _portfolio[formData.symbol] && formData.quantity <= _portfolio[formData.symbol].quantity; + }; + + stub.makeSell = function(formData){ + //add to balance + stub.makeTransaction(-formData.quantity*formData.price); + //add to transactions + var newTransaction = { + symbol: formData.symbol, + quantity: formData.quantity, + type: "SELL", + price: formData.price + }; + _transactions.push(newTransaction); + //console.log("Transactions: ", _transactions); + //adjust porfolio + _portfolio[formData.symbol].quantity -= formData.quantity; + _portfolio[formData.symbol].moneyEarned += formData.quantity * formData.price; + //console.log("Portfolio: ", _portfolio); + }; + + stub.makeBuy = function(symbol, quantity, price){ + //substract from balance + stub.makeTransaction(quantity*price); + //add to transactions + var newTransaction = { + symbol: symbol, + quantity: quantity, + type: "BUY", + price: price + }; + _transactions.push(newTransaction); + //console.log("Transactions: ", _transactions); + //add to portfolio + if(_portfolio[symbol]){ + _portfolio[symbol].quantity += quantity; + _portfolio[symbol].moneySpent += (quantity*price); + } + else{ + _portfolio[symbol] = { + quantity: quantity, + moneySpent: quantity*price, + moneyEarned: 0 + }; + } + //console.log("Portfolio: ", _portfolio); + }; + + return stub; +}); \ No newline at end of file diff --git a/js/templates/mainContent.html b/js/templates/mainContent.html index 1ba987a..be33d1c 100644 --- a/js/templates/mainContent.html +++ b/js/templates/mainContent.html @@ -1 +1 @@ -mainContent.html \ No newline at end of file + \ No newline at end of file diff --git a/js/templates/stockTicker.html b/js/templates/stockTicker.html index 3ca766c..ea530df 100644 --- a/js/templates/stockTicker.html +++ b/js/templates/stockTicker.html @@ -4,5 +4,5 @@ {{ oneDay | myCurrency }} {{ sevenDay | myCurrency }} {{ thirtyDay | myCurrency }} - trade + trade diff --git a/js/templates/trade.html b/js/templates/trade.html index 55b58fb..934e8f0 100644 --- a/js/templates/trade.html +++ b/js/templates/trade.html @@ -1 +1,2 @@ -trade.html \ No newline at end of file + + diff --git a/js/templates/tradeForm.html b/js/templates/tradeForm.html new file mode 100644 index 0000000..f627603 --- /dev/null +++ b/js/templates/tradeForm.html @@ -0,0 +1,34 @@ +
+
+

Trade

+
+
+ + + + + + + + +
+ +
+
+
+

Cash Available: {{ account.cash | currency }}

+

Order Status

+

{{ orderStatus }}

+
+
\ No newline at end of file From 2445a59ad9fa54c132eb20275057ea9740a1c4df Mon Sep 17 00:00:00 2001 From: David Jiang Date: Fri, 30 Sep 2016 15:13:22 -0700 Subject: [PATCH 13/21] transaction view with filtering --- Notes.txt | 22 +++++++++++++++++++- index.html | 1 + js/app.js | 8 ++++++-- js/controllers/tradeCtrl.js | 2 +- js/controllers/transactionsCtrl.js | 6 ++++++ js/directives/tradeForm.js | 4 ++-- js/services/accountService.js | 32 ++++++++++++++++++------------ js/templates/trade.html | 1 + js/templates/tradeForm.html | 2 +- js/templates/transactions.html | 22 +++++++++++++++++++- 10 files changed, 79 insertions(+), 21 deletions(-) create mode 100644 js/controllers/transactionsCtrl.js diff --git a/Notes.txt b/Notes.txt index 7a01705..850d127 100644 --- a/Notes.txt +++ b/Notes.txt @@ -36,4 +36,24 @@ _stockDates: }, AREX:{} ... -} \ No newline at end of file +} + +portfolio: +{ + AAPL: { + quantity: 1400, + moneySpent:, + moneyEarned: + + } +} + +transactions: +[{ + date: , + symbol: , + type: , + quantity: , + price: + +}] \ No newline at end of file diff --git a/index.html b/index.html index 1cbe9a7..6cdd5dc 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,7 @@ + diff --git a/js/app.js b/js/app.js index edd083d..00e2f73 100644 --- a/js/app.js +++ b/js/app.js @@ -58,8 +58,12 @@ app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $ur }) .state('main.transactions', { url: '/transactions', - templateUrl: 'js/templates/transactions.html', - controller: 'TransactionsCtrl' + views: { + 'mainContent@': { + templateUrl: 'js/templates/transactions.html', + controller: 'TransactionsCtrl' + } + } }); }]); diff --git a/js/controllers/tradeCtrl.js b/js/controllers/tradeCtrl.js index 428c16a..f7dd0a8 100644 --- a/js/controllers/tradeCtrl.js +++ b/js/controllers/tradeCtrl.js @@ -1,6 +1,6 @@ "use strict"; app.controller('TradeCtrl', ['$scope', 'dates', '$stateParams', function($scope, dates, $stateParams){ - $scope.symbol = $stateParams.symbol; + $scope.symbol = $stateParams.symbol || "AAPL"; $scope.dates = dates; }]); \ No newline at end of file diff --git a/js/controllers/transactionsCtrl.js b/js/controllers/transactionsCtrl.js new file mode 100644 index 0000000..57ece26 --- /dev/null +++ b/js/controllers/transactionsCtrl.js @@ -0,0 +1,6 @@ +"use strict"; +app.controller('TransactionsCtrl', ['$scope', 'accountService', function($scope, accountService){ + + $scope.transactions = accountService.getTransactions(); + +}]); \ No newline at end of file diff --git a/js/directives/tradeForm.js b/js/directives/tradeForm.js index c812eb2..44aab40 100644 --- a/js/directives/tradeForm.js +++ b/js/directives/tradeForm.js @@ -30,8 +30,8 @@ app.directive('tradeForm', ['StocksService', 'dateService', 'accountService', fu scope.placeTrade = function(){ if(scope.formData.action === "buy"){ //check buy - if(accountService.checkValidBuy(scope.formData.quantity*scope.formData.price)){ - accountService.makeBuy(scope.formData.symbol, scope.formData.quantity, scope.formData.price); + if(accountService.checkValidBuy(scope.formData)){ + accountService.makeBuy(scope.formData); scope.orderStatus = "Order Placed!"; } else{ diff --git a/js/services/accountService.js b/js/services/accountService.js index 3bf0197..70a92d0 100644 --- a/js/services/accountService.js +++ b/js/services/accountService.js @@ -16,8 +16,12 @@ app.factory('accountService', function(){ return _account; }; - stub.checkValidBuy = function(amount){ - return amount <= _account.cash; + stub.getTransactions = function(){ + return _transactions; + }; + + stub.checkValidBuy = function(formData){ + return formData.price * formData.quantity <= _account.cash; }; stub.checkValidSell = function(formData){ @@ -30,6 +34,7 @@ app.factory('accountService', function(){ stub.makeTransaction(-formData.quantity*formData.price); //add to transactions var newTransaction = { + date: formData.date, symbol: formData.symbol, quantity: formData.quantity, type: "SELL", @@ -43,27 +48,28 @@ app.factory('accountService', function(){ //console.log("Portfolio: ", _portfolio); }; - stub.makeBuy = function(symbol, quantity, price){ + stub.makeBuy = function(formData){ //substract from balance - stub.makeTransaction(quantity*price); + stub.makeTransaction(formData.quantity*formData.price); //add to transactions var newTransaction = { - symbol: symbol, - quantity: quantity, + date: formData.date, + symbol: formData.symbol, + quantity: formData.quantity, type: "BUY", - price: price + price: formData.price }; _transactions.push(newTransaction); //console.log("Transactions: ", _transactions); //add to portfolio - if(_portfolio[symbol]){ - _portfolio[symbol].quantity += quantity; - _portfolio[symbol].moneySpent += (quantity*price); + if(_portfolio[formData.symbol]){ + _portfolio[formData.symbol].quantity += formData.quantity; + _portfolio[formData.symbol].moneySpent += (formData.quantity*formData.price); } else{ - _portfolio[symbol] = { - quantity: quantity, - moneySpent: quantity*price, + _portfolio[formData.symbol] = { + quantity: formData.quantity, + moneySpent: formData.quantity*formData.price, moneyEarned: 0 }; } diff --git a/js/templates/trade.html b/js/templates/trade.html index 934e8f0..34e19fd 100644 --- a/js/templates/trade.html +++ b/js/templates/trade.html @@ -1,2 +1,3 @@ +Transactions diff --git a/js/templates/tradeForm.html b/js/templates/tradeForm.html index f627603..fb7bcff 100644 --- a/js/templates/tradeForm.html +++ b/js/templates/tradeForm.html @@ -7,7 +7,7 @@

Trade