|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.fisincorporated.stockinfoserver.YahooServer
Use Yahoo Finance as source of stock info. Create a Stock object from stock info supplied from Yahoo. Started from Joone YahooInputSynapse but wanted to use for StockImager and Jess. Reinventing the wheel?
The YahooServer 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.
For the particular stock symbol.
Developer Notes :
This YahooServer 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
Eric Foertsch
| Constructor Summary | |
YahooServer()
Constructor for the YahooServer object |
|
| Method Summary | |
java.lang.String |
getDateEnd()
Gets year to end data retrieval from |
java.lang.String |
getDateStart()
Gets year to start data retrieval from. |
java.lang.String |
getPeriod()
Gets the period for data retrieval. |
Stock |
getStockData()
Connects to Yahoo FInancial Services and obtains the historical data for the specifed symbol and data range. |
Stock |
getStockData(java.lang.String Symbol)
Connects to Yahoo FInancial Services and obtains the historical data for the specifed symbol and data range. |
java.lang.String |
getSymbol()
Gets the name of the symbol |
static void |
main(java.lang.String[] args)
|
void |
setDateEnd(java.lang.String newDateEnd)
Sets the date for which data is retrieved. |
void |
setDateStart(java.lang.String newDateStart)
Sets the date for which data is retrieved. |
void |
setPeriod(java.lang.String newPeriod)
Sets the period with which to retrieve data should be one of "Daily" or "Monthly" or "Yearly". |
void |
setSymbol(java.lang.String newSymbol)
Sets the stock symbol |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public YahooServer()
| Method Detail |
public java.lang.String getSymbol()
public java.lang.String getDateStart()
public java.lang.String getDateEnd()
public java.lang.String getPeriod()
public void setSymbol(java.lang.String newSymbol)
newSymbol - The new stock symbol to retrieve the data with.public void setDateStart(java.lang.String newDateStart)
newDateStart - The data from which data is retrieved.public void setDateEnd(java.lang.String newDateEnd)
newDateEnd - The date to which data is retrieved.public void setPeriod(java.lang.String newPeriod)
newPeriod - The period with which data is retieved.
public Stock getStockData(java.lang.String Symbol)
throws java.lang.Exception
java.lang.Exception
public Stock getStockData()
throws java.lang.Exception
java.lang.Exceptionpublic static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||