diff --git a/.recommenders/caches/identified-project-coordinates.json b/.recommenders/caches/identified-project-coordinates.json index d2d0c5f..19fa72d 100644 --- a/.recommenders/caches/identified-project-coordinates.json +++ b/.recommenders/caches/identified-project-coordinates.json @@ -1 +1 @@ -[[{"location":"E:\\Programming\\School\\JAVA_Application_Project\\Java_Course_Project\\Statistical_Analysis","type":"PROJECT","hints":{"PROJECT_NAME":"Statistical_Analysis"}},"ABSENT"],[{"location":"C:\\Program Files\\Java\\jre1.8.0_144","type":"JRE","hints":{"EXECUTION_ENVIRONMENT":"JavaSE-1.8"}},"jre:jre:1.8.0"]] \ No newline at end of file +[[{"location":"C:\\Users\\DongGoo\\Downloads\\jfreechart-1.0.19\\jfreechart-1.0.19\\lib\\jfreechart-1.0.19.jar","type":"JAR","hints":{}},"ABSENT"],[{"location":"C:\\Program Files\\Java\\jre1.8.0_144","type":"JRE","hints":{"EXECUTION_ENVIRONMENT":"JavaSE-1.8"}},"jre:jre:1.8.0"],[{"location":"C:\\Java_Course_Project\\Statistical_Analysis","type":"PROJECT","hints":{"PROJECT_NAME":"Statistical_Analysis"}},"ABSENT"]] \ No newline at end of file diff --git a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen index beab6bd..ae67acc 100644 Binary files a/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen and b/.recommenders/index/http___download_eclipse_org_recommenders_models_oxygen_/segments.gen differ diff --git a/Statistical_Analysis/.classpath b/Statistical_Analysis/.classpath index eb6eb6d..0980236 100644 --- a/Statistical_Analysis/.classpath +++ b/Statistical_Analysis/.classpath @@ -4,8 +4,7 @@ - - - + + diff --git a/Statistical_Analysis/Data/Historical/AAPL.csv b/Statistical_Analysis/Data/Historical/AAPL.csv index b48cda6..439528c 100644 --- a/Statistical_Analysis/Data/Historical/AAPL.csv +++ b/Statistical_Analysis/Data/Historical/AAPL.csv @@ -1,6 +1,10 @@ timestamp,open,high,low,close,adjusted_close,volume,dividend_amount,, -2017-11-27,175.0500,175.0800,173.3400,174.0900,174.0900,20590163,0.0000,, -2017-11-24,175.1000,175.5000,174.6500,174.9700,174.9700,14026519,0.0000,, +2017-12-01,169.9500,171.6700,168.5000,171.0500,171.0500,39590080,0.0000,, +2017-11-30,170.4300,172.1400,168.4400,171.8500,171.8500,41484363,0.0000,, +2017-11-29,172.6300,172.9200,167.1600,169.4800,169.4800,41456722,0.0000,, +2017-11-28,174.3000,174.8700,171.8600,173.0700,173.0700,25468442,0.0000,, +2017-11-27,175.0500,175.0800,173.3400,174.0900,174.0900,20536313,0.0000,, +2017-11-24,175.1000,175.5000,174.6459,174.9700,174.9700,14026519,0.0000,, 2017-11-22,173.3600,175.0000,173.0500,174.9600,174.9600,24997274,0.0000,, 2017-11-21,170.7800,173.7000,170.7800,173.1400,173.1400,24875471,0.0000,, 2017-11-20,170.2900,170.5600,169.5600,169.9800,169.9800,15974387,0.0000,, diff --git a/Statistical_Analysis/DataMeta/Availability.csv b/Statistical_Analysis/DataMeta/Availability.csv index a19ba15..b21c825 100644 --- a/Statistical_Analysis/DataMeta/Availability.csv +++ b/Statistical_Analysis/DataMeta/Availability.csv @@ -1,7 +1,7 @@ -AAPL,2017-11-28,2000-01-03, +AAPL,2017-12-02,2000-01-03, SFNC,2017-11-26,2000-01-03, CPRT,2017-11-26,2000-01-03, -GOOG,2017-11-27,2014-03-27, +GOOG,2017-11-28,2014-03-27, EDIG,2017-11-26,2000-01-03, IRCP,2017-11-26,2003-11-05, WAYN,2017-11-26,2000-01-03, @@ -17,8 +17,8 @@ STX,2017-11-27,2002-12-11, XOM,2017-11-27,2000-01-03, MARA,2017-11-26,2012-05-04, AVGO,2017-11-27,2009-08-06, -AAPL,2017-11-28,2000-01-03, -GOOG,2017-11-27,2014-03-27, +AAPL,2017-12-02,2000-01-03, +GOOG,2017-11-28,2014-03-27, TSLA,2017-11-28,2010-06-29, AMZN,2017-11-27,2000-01-03, XRT,2017-11-27,2006-06-22, @@ -29,6 +29,10 @@ XOM,2017-11-27,2000-01-03, AVGO,2017-11-27,2009-08-06, AAP,2017-11-27,2001-11-29, ABC,2017-11-27,2000-01-03, -AAPL,2017-11-28,2000-01-03, +AAPL,2017-12-02,2000-01-03, TSLA,2017-11-28,2010-06-29, GOOG,2017-11-28,2014-03-27, +AAPL,2017-12-02,2000-01-03, +AAPL,2017-12-02,2000-01-03, +AAPL,2017-12-02,2000-01-03, +AAPL,2017-12-02,2000-01-03, diff --git a/Statistical_Analysis/GUISource/generalInfoFrame/GeneralInfoFramePanel_LatestData.java b/Statistical_Analysis/GUISource/generalInfoFrame/GeneralInfoFramePanel_LatestData.java index d8a0dba..4a0513a 100644 --- a/Statistical_Analysis/GUISource/generalInfoFrame/GeneralInfoFramePanel_LatestData.java +++ b/Statistical_Analysis/GUISource/generalInfoFrame/GeneralInfoFramePanel_LatestData.java @@ -2,5 +2,5 @@ import javax.swing.*; public class GeneralInfoFramePanel_LatestData extends JPanel{ - + } diff --git a/Statistical_Analysis/GUISource/graphFrame/GraphFramePanel_Chart.java b/Statistical_Analysis/GUISource/graphFrame/GraphFramePanel_Chart.java new file mode 100644 index 0000000..a1db755 --- /dev/null +++ b/Statistical_Analysis/GUISource/graphFrame/GraphFramePanel_Chart.java @@ -0,0 +1,124 @@ +package graphFrame; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.util.ArrayList; +import java.util.Date; +import java.util.Collection; +import java.util.Collections; + +import javax.swing.*; + +import org.jfree.chart.*; +import org.jfree.chart.axis.DateAxis; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.axis.Timeline; +import org.jfree.chart.plot.PlotOrientation; +import org.jfree.chart.plot.XYPlot; +import org.jfree.chart.renderer.xy.CandlestickRenderer; +import org.jfree.data.*; +import org.jfree.data.category.DefaultCategoryDataset; +import org.jfree.data.general.DatasetGroup; +import org.jfree.data.time.TimeSeries; +import org.jfree.data.xy.DefaultHighLowDataset; +import org.jfree.data.xy.XYDataset; + +import black.Utils; +import gray.Global; +import red.Stock; + +public class GraphFramePanel_Chart extends JPanel{ + Stock stock; + + String symbol; + ArrayList date; + ArrayList high; + ArrayList low; + ArrayList open; + ArrayList adj_close; + ArrayList volume; + + BorderLayout layout = new BorderLayout(); + + DefaultHighLowDataset data; + + + JFreeChart chart; + ChartPanel chartPanel; + + + Double y_axis_min; + Double y_axis_max; + + GraphFramePanel_Chart(){ + renderPanel(); + } + + public void renderPanel() { + removeAll(); + + setLayout(layout); + + data = createDataset(); + chart = createChart(data); + chartPanel = new ChartPanel(chart); + + add(chartPanel); + + validate(); + repaint(); + } + + @SuppressWarnings("unchecked") + public DefaultHighLowDataset createDataset() { + stock = new Stock(Global.SYMBOL); + + symbol = stock.SYMBOL; + date = stock.request("DATE", Global.GraphStart, Global.GraphEnd); + high = stock.request("HIGH", Global.GraphStart, Global.GraphEnd); + low = stock.request("LOW", Global.GraphStart, Global.GraphEnd); + open = stock.request("OPEN", Global.GraphStart, Global.GraphEnd); + adj_close = stock.request("ADJ_CLOSE", Global.GraphStart, Global.GraphEnd); + volume = stock.request("VOLUME", Global.GraphStart, Global.GraphEnd); + + Date[] date_list = new Date[date.size()]; + date_list = Utils.StringToDate(date); + double[] high_list = new double[high.size()]; + double[] low_list = new double[low.size()]; + double[] open_list = new double[open.size()]; + double[] adj_close_list = new double[adj_close.size()]; + double[] volume_list = new double[volume.size()]; + for (int i=0; i