Class YahooFinanceInputSynapse
- java.lang.Object
-
- org.joone.engine.Synapse
-
- org.joone.io.StreamInputSynapse
-
- org.joone.io.YahooFinanceInputSynapse
-
- All Implemented Interfaces:
- java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, InputSynapse, PlugInListener
public class YahooFinanceInputSynapse extends StreamInputSynapse
The YahooFinanceInputSynapse provides support for financial data input from financial markets. The synapse contacts YahooFinance services and downloads historical data for the chosen symbol and date range. Finally the data is presented to the network in reverse date order i.e oldest first.
This synapse provides the following info ..
Open as column 1
High as column 2
Low as column 3
Close as column 4.
Volume as column 5.
Adj.Close as column 6.
For the particular stock symbol.
Developer Notes :
This YahooFinanceInputSynapse uses the following format to extract stock financial information from the Yahoo Network
.http://table.finance.yahoo.com/table.csv?a=8&b=1&c=2002&d=11&e=3&f=2002&s=tsco.l&y=0&g=d&ignore=.csv
a = From Month 0 - 11
b = From Day 1-31
c = From Year XXXX
d = To Month 0-11
e = To Day 1-31
f = To Year XXXX
s = Symbol
y = [record] from record to + 200 records
g=[d] or[m] or [y] - daily or monthly or yearly
ignore = .csv
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description YahooFinanceInputSynapse()Constructor for the YahooFinanceInputSynapse object
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description java.util.TreeSetcheck()Check that there are no errors or problems with the properties of this YahooFinanceInputSynapse.java.lang.StringgetDateEnd()Deprecated.Use getEndDate insteadjava.lang.StringgetDateStart()Deprecated.Use getStartDate insteadjava.util.DategetEndDate()java.lang.StringgetPeriod()Gets the period for data retrieval.java.util.DategetStartDate()java.util.Vector[]getStockData()Gets the stock data retrieived by this synapse.java.util.VectorgetStockDates()Gets the dates associated with each row of data.java.lang.StringgetSymbol()Gets the name of the symbolvoidsetDateEnd(java.lang.String newDateEnd)Gets the the data to which data is retrieved.voidsetDateStart(java.lang.String newDateStart)Deprecated.Use setStartDate insteadvoidsetEndDate(java.util.Date endDate)voidsetPeriod(java.lang.String newPeriod)Sets the period with which to retrieve data should be one of "Daily" or "Monthly" or "Yearly".voidsetStartDate(java.util.Date startDate)voidsetSymbol(java.lang.String newSymbol)Deprecated.Use setEndDate instead-
Methods inherited from class org.joone.io.StreamInputSynapse
addPlugIn, addPlugInListener, dataChanged, fwdGet, fwdGet, getAdvancedColumnSelector, getAllPlugInListeners, getCurrentRow, getDecimalPoint, getFirstCol, getFirstRow, getInputPatterns, getInputVector, getLastCol, getLastRow, getMaxBufSize, getPlugIn, getStream, gotoFirstLine, gotoLine, InspectableTitle, Inspections, isBuffered, isEOF, isStepCounter, numColumns, readAll, removeAllPlugIns, removePlugInListener, reset, resetInput, revPut, setAdvancedColumnSelector, setBuffered, setDecimalPoint, setFirstCol, setFirstRow, setInputPatterns, setLastCol, setLastRow, setMaxBufSize, setPlugin, setPlugIn, setStepCounter
-
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdPut, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getWeights, init, initLearner, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, revGet, setEnabled, setIgnoreBefore, setInputDimension, setInputFull, setLearningRate, setLoopBack, setMomentum, setMonitor, setName, setOutputDimension, setOutputFull, setWeights
-
-
-
-
Constructor Detail
-
YahooFinanceInputSynapse
public YahooFinanceInputSynapse()
Constructor for the YahooFinanceInputSynapse object
-
-
Method Detail
-
getSymbol
public java.lang.String getSymbol()
Gets the name of the symbol- Returns:
- The Symbol name
-
getDateStart
public java.lang.String getDateStart()
Deprecated. Use getStartDate insteadGets year to start data retrieval from.- Returns:
- The year to start from
-
getDateEnd
public java.lang.String getDateEnd()
Deprecated. Use getEndDate insteadGets year to end data retrieval from- Returns:
- The year to end on
-
getPeriod
public java.lang.String getPeriod()
Gets the period for data retrieval.- Returns:
- The month to end on
-
getStockDates
public java.util.Vector getStockDates()
Gets the dates associated with each row of data.
-
getStockData
public java.util.Vector[] getStockData()
Gets the stock data retrieived by this synapse. Returns the data in a Vector array of length 5.
In column 0 Open data.
In column 1 High
In column 2 Low
In column 3 Close
In column 4 Volume
In column 5 Adj.Close
-
setSymbol
public void setSymbol(java.lang.String newSymbol)
Deprecated. Use setEndDate insteadSets the name of the database jdbc driver.- Parameters:
newSymbol- The new stock symbol to retrieve the data with.
-
setDateStart
public void setDateStart(java.lang.String newDateStart)
Deprecated. Use setStartDate insteadGets the the data from which data is retrieved.- Parameters:
newDataStart- The data from which data is retrieved.
-
setDateEnd
public void setDateEnd(java.lang.String newDateEnd)
Gets the the data to which data is retrieved.- Parameters:
newDateEnd- The date to which data is retrieved.
-
setPeriod
public void setPeriod(java.lang.String newPeriod)
Sets the period with which to retrieve data should be one of "Daily" or "Monthly" or "Yearly".- Parameters:
newPeriod- The period with which data is retieved.
-
check
public java.util.TreeSet check()
Check that there are no errors or problems with the properties of this YahooFinanceInputSynapse.- Specified by:
checkin interfaceNeuralElement- Overrides:
checkin classStreamInputSynapse- Returns:
- The TreeSet of errors / problems if any.
- See Also:
Synapse
-
getStartDate
public java.util.Date getStartDate()
-
setStartDate
public void setStartDate(java.util.Date startDate)
-
getEndDate
public java.util.Date getEndDate()
-
setEndDate
public void setEndDate(java.util.Date endDate)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG