|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfinance.stocks.StockUtils
public class StockUtils
User: lyon Date: Jul 9, 2007 Time: 12:56:05 PM Copyright DocJava, Inc. 2005.
Constructor Summary | |
---|---|
StockUtils()
|
Method Summary | |
---|---|
static double[] |
getAccumulation(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate)
This routine computes the accumulation by taking the priceDelta * Volume and adding it until the end-date priceDelta = closePrice - openPrice an accumulation > 0 indicates the stock is under accumulation. |
static double[] |
getDeltaP(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate)
|
static java.util.Date |
getNextTradingDate(java.util.Date startDate)
This will return the next trading day, provided that it has already occured. |
static java.util.Date[] |
getNPreviousTradingDates(java.util.Date endDate,
int n)
Look back 2*n calendar days and extract the n trading days previous to the endDate. |
static double[] |
getTurnover(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate,
int period)
|
static void |
graphAccumulation()
|
static void |
graphAccumulation(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate)
|
static void |
graphDeltaP(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate)
|
static void |
graphPrice()
EODQuotes.graphGui - prompts the user for symbol, start date and end date. |
static void |
graphPrice(java.lang.String symbol,
java.util.GregorianCalendar start,
java.util.GregorianCalendar end)
|
static void |
graphTurnOver()
|
static void |
graphTurnOver(java.lang.String symbol,
java.util.Date startDate,
java.util.Date endDate,
int period)
|
static void |
graphVolume()
|
static void |
main(java.lang.String[] args)
|
static void |
printCV(java.lang.String symbol,
int daysPrior,
java.util.Date endDate)
Compute the coeffient of variation daysPrior to the endDate for the stock. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StockUtils()
Method Detail |
---|
public static void graphPrice()
public static void graphPrice(java.lang.String symbol, java.util.GregorianCalendar start, java.util.GregorianCalendar end) throws java.text.ParseException, java.io.IOException
java.text.ParseException
java.io.IOException
public static void graphVolume() throws java.text.ParseException, java.io.IOException, javax.swing.text.BadLocationException
java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
public static void graphTurnOver() throws java.text.ParseException, java.io.IOException, javax.swing.text.BadLocationException
java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
public static void graphTurnOver(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate, int period) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static double[] getTurnover(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate, int period) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static double[] getAccumulation(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
symbol
- startDate
- endDate
-
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static double[] getDeltaP(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static void graphAccumulation() throws java.text.ParseException, java.io.IOException, javax.swing.text.BadLocationException
java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
public static void graphAccumulation(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static void graphDeltaP(java.lang.String symbol, java.util.Date startDate, java.util.Date endDate) throws java.io.IOException, javax.swing.text.BadLocationException, java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
java.text.ParseException
public static void printCV(java.lang.String symbol, int daysPrior, java.util.Date endDate) throws java.text.ParseException, java.io.IOException
symbol
- daysPrior
- endDate
-
java.text.ParseException
java.io.IOException
public static java.util.Date[] getNPreviousTradingDates(java.util.Date endDate, int n) throws java.text.ParseException, java.io.IOException
endDate
- start of the look back.n
- exact number of valid trading days (not holidays).
java.text.ParseException
java.io.IOException
public static java.util.Date getNextTradingDate(java.util.Date startDate) throws java.text.ParseException, java.io.IOException
startDate
-
java.text.ParseException
java.io.IOException
public static void main(java.lang.String[] args) throws java.text.ParseException, java.io.IOException, javax.swing.text.BadLocationException
java.text.ParseException
java.io.IOException
javax.swing.text.BadLocationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |