導航:首頁 > 數據行情 > 用java編寫股票數據分析

用java編寫股票數據分析

發布時間:2022-08-17 23:45:09

1. 擁有java基礎,怎樣編寫一個股票分析軟體

一般這種軟體重要的就是演算法,而且這些演算法在網上可以找到,但這些演算法對資源要求太高,所以你要懂點分布計算來把演算法的計算任務分給多個計算機並行計算,hadoop吧應該

2. 3、 用java定義一個股票類Stock,該類包括如右圖所示

public
class
stock
{
private
string
store;//
股票類屬性
private
string
symbol;//
股票代號
private
string
name;//
股票名稱
private
bigdecimal
currentprice;//
當前時間的股票價格
private
bigdecimal
previouclosingprice;//
前一天的股票值
/**
*
返回前一天變到當前時間的百分比
*
@return
百分比
*/
public
double
getchangepercent()
{
return
this.currentprice.subtract(this.previouclosingprice).abs()
.divide(this.currentprice,
2,
bigdecimal.round_half_even)
.doublevalue();
}
/**
*
返回前一天變到當前時間的百分比
*
@param
currentprice
當前時間的股票價格
*
@param
previouclosingprice
前一天的股票值
*
@return
百分比
*/
public
double
getchangepercent(bigdecimal
currentprice,
bigdecimal
previouclosingprice)
{
return
currentprice.subtract(previouclosingprice).abs()
.divide(currentprice,
2,
bigdecimal.round_half_even)
.doublevalue();
}
public
string
getstore()
{
return
store;
}
public
void
setstore(string
store)
{
this.store
=
store;
}
public
string
getsymbol()
{
return
symbol;
}
public
void
setsymbol(string
symbol)
{
this.symbol
=
symbol;
}
public
string
getname()
{
return
name;
}
public
void
setname(string
name)
{
this.name
=
name;
}
public
bigdecimal
getcurrentprice()
{
return
currentprice;
}
public
void
setcurrentprice(bigdecimal
currentprice)
{
this.currentprice
=
currentprice;
}
public
bigdecimal
getpreviouclosingprice()
{
return
previouclosingprice;
}
public
void
setpreviouclosingprice(bigdecimal
previouclosingprice)
{
this.previouclosingprice
=
previouclosingprice;
}
}

3. 請問怎樣用Java獲取股票行情歷史數據新浪、搜狐、百度財經都可以......

publicclassStockConnection{
publicstaticvoidmain(String[]args){
URLur=null;
try{
//搜狐股票行情歷史介面
// ur=newURL("http://q.stock.sohu.com/hisHq?code=cn_300228&start=20130930&end=20131231&stat=1&order=D&period=d&callback=historySearchHandler&rt=jsonp");
//新浪股票行情歷史介面
ur=newURL("http://biz.finance.sina.com.cn/stock/flash_hq/kline_data.php?&rand=random(10000)&symbol=sh600000&end_date=20150809&begin_date=20000101&type=plain");
HttpURLConnectionuc=(HttpURLConnection)ur.openConnection();
BufferedReaderreader=newBufferedReader(newInputStreamReader(ur.openStream(),"GBK"));
Stringline;
while((line=reader.readLine())!=null){
System.out.println(line);
}
}catch(Exceptione){
//TODOAuto-generatedcatchblock
e.printStackTrace();
}
}
}

4. 設計一個Java股票程序

天哪....你給錢我就給你做..
誰會花這么多時間在你身上....

5. java 如何實現 獲取實時股票數據

一般有三種方式:

  1. 網頁爬蟲。採用爬蟲去爬取目標網頁的股票數據,去GitHub或技術論壇(如CSDN、51CTO)上找一下別人寫的爬蟲集成到項目中。

  2. 請求第三方API。會有專門的公司(例如網路API市場)提供股票數據,你只需要去購買他們的服務,使用他們提供的SDK,仿照demo開發實現即可。如下圖所示:

6. 用java定義一個股票類Stock,該類包括如右圖所示

public class Stock {
private String store;// 股票類屬性
private String symbol;// 股票代號
private String name;// 股票名稱
private BigDecimal currentPrice;// 當前時間的股票價格
private BigDecimal previouClosingPrice;// 前一天的股票值

/**
* 返回前一天變到當前時間的百分比
* @return 百分比
*/
public double getChangePercent() {
return this.currentPrice.subtract(this.previouClosingPrice).abs()
.divide(this.currentPrice, 2, BigDecimal.ROUND_HALF_EVEN)
.doubleValue();
}

/**
* 返回前一天變到當前時間的百分比
* @param currentPrice 當前時間的股票價格
* @param previouClosingPrice 前一天的股票值
* @return 百分比
*/
public double getChangePercent(BigDecimal currentPrice,
BigDecimal previouClosingPrice) {
return currentPrice.subtract(previouClosingPrice).abs()
.divide(currentPrice, 2, BigDecimal.ROUND_HALF_EVEN)
.doubleValue();
}

public String getStore() {
return store;
}

public void setStore(String store) {
this.store = store;
}

public String getSymbol() {
return symbol;
}

public void setSymbol(String symbol) {
this.symbol = symbol;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public BigDecimal getCurrentPrice() {
return currentPrice;
}

public void setCurrentPrice(BigDecimal currentPrice) {
this.currentPrice = currentPrice;
}

public BigDecimal getPreviouClosingPrice() {
return previouClosingPrice;
}

public void setPreviouClosingPrice(BigDecimal previouClosingPrice) {
this.previouClosingPrice = previouClosingPrice;
}

}

7. 能否用JAVA開發個性化股票分析技術

當然可以,用啥開發無所謂,關鍵的是你的個性化股票分析技術管用不,也就是演算法問題嘍,這方面很復雜,什麼混沌、分形、有效市場等等理論很多,不討論了。
圖形方面,Java或C++都能勝任,但看你是要面對什麼用戶了,為了擴大用戶,一般都是web上,界面上用html展示,圖形用Javascript組件,或者flash來顯示;如果面對手機或平板用戶,比如android或蘋果,或Win8,那應該分別開發客戶端,這主要是屏幕適配的問題,手機屏幕比較小。其實用web也可以全部搞定,所以html5是一個趨勢,將來都用它提供的豐富功能就不用考慮用計算機還是手機了。

8. Java 實現股票走勢對比分析 ,功能就是實現 各只股票與大盤的對比 選出最優股

首先你要搞清楚大盤運行的區域,目前的頂是哪,底是哪,大盤的阻力和支撐在哪個位置,從而判斷大盤向上或向下的可能性;
然後學習如何選股,選股要從股票的基本面看其公司是否具備成長性或者屬於政策導向,從技術面選擇切入點,技術面的學習很關鍵,要看K線 均線 趨勢線 加上成交量的 整體區域研判,結合共振看走勢分析。
我獨創了七線開花理論,來做判斷,這種股大概率會出現主升浪,容易成黑馬,感興趣可以免費進來學習。

閱讀全文

與用java編寫股票數據分析相關的資料

熱點內容
還是etf好股票太危險 瀏覽:868
連續4漲停的股票有哪些 瀏覽:341
看股票app軟體哪個好 瀏覽:7
中國股票總利潤 瀏覽:412
股票賬戶凈資產不包括融資盈虧嗎 瀏覽:905
美國上市公司給員工股票 瀏覽:785
京東股票app賬號 瀏覽:981
股票是下降趨勢做T能賺錢嗎 瀏覽:496
603196股票走勢 瀏覽:360
發放現金股利對股票市價的影響 瀏覽:541
一隻股票流通盤 瀏覽:716
股票分紅怎麼到賬戶 瀏覽:232
青島農商銀行股票歷史數據 瀏覽:231
博暉創新股票業績好嗎 瀏覽:157
股票賣出時顯示資金可用數不足 瀏覽:795
美股股票退市了怎麼辦 瀏覽:698
股票投資咨詢去卓信寶 瀏覽:740
奧特佳股票2020走勢 瀏覽:331
雪球股票只能看近一年的賬戶分析 瀏覽:98
中國中材股份股票行情 瀏覽:617