顯示具有 shell script 標籤的文章。 顯示所有文章
顯示具有 shell script 標籤的文章。 顯示所有文章

2012年8月3日 星期五

安裝 geniustrader

2012-05-08

加入路徑

~/.profile
# set PATH so it includes user's geniustrader if it exists
if [ -d "$HOME/geniustrader/Scripts" ] ; then
PATH="$PATH:$HOME/geniustrader/Scripts"
fi

perl 相關 modules 安裝


  • Date::Manip (debian package: libdate-manip-perl)
  • Date::Calc (debian package: libdate-calc-perl)
  • Getopt::Long (debian package: libgetopt-long-descriptive-perl)
  • XML::LibXML (debian package: libxml-libxml-perl)
  • Compress::Zlib (debian package: wheezy/libcompress-zlib-perl)
  • Storable (standard in Perl 5.14, debian package for wheezy/perl 5.14: libstorable-perl)
  • GD (debian package: wheezy/libgd-gd2-perl)
  • Data::Dumper
  • HTML::Mason
  • Math::Trig
  • POSIX
  • Pod::Simple
  • Pod::Usage
  • Pod::Parser

其他 modules


modules (程式) 備註
File::Find
File::Spec
IO::Handle
Perl core 一部份
GD (backtest.pl) perl 圖形套件隨著 c gd 程式庫 libgd
DBI
DBD::Pg
DBD::mysql
DBD::SQLite
DBD::SQLite2
DBD::File
DBD::ODBC
若有用 SQL 後端儲存價格資料
Finance::BeanCounter 推薦的股票價格數據庫應用程序
Time::Local 使用 CSV (GT/DB/CSV.pm) 基礎價格資料
與 GT/DB/Text.pm text based prices data 不同
List::Util 用在 future max/min 方法
Test::More Test::Differences tool kit modules 執行測試
LWP 若有使用 GT/DB/HTTP.pm
XML::Simple 只在 backtest_multi.pl 用到, 其他 GT 應用程式使用 XML::LibXML
perldoc 不一定需要


測試

  • script 在 <geniustrader>/Scripts
  • RSI txf2012 (txf 201201 - 20120703)
    cd Scripts
    ./display_indicator.pl I:RSI txf2012 | less

結果

Calculating indicator RSI[14, {I:Prices CLOSE}] ...
RSI[14, {I:Prices CLOSE}][2012/01/31] = 79.7701
RSI[14, {I:Prices CLOSE}][2012/02/01] = 78.6667
RSI[14, {I:Prices CLOSE}][2012/02/02] = 80.8903
RSI[14, {I:Prices CLOSE}][2012/02/03] = 79.8857
RSI[14, {I:Prices CLOSE}][2012/02/04] = 84.7966
RSI[14, {I:Prices CLOSE}][2012/02/06] = 83.0189
RSI[14, {I:Prices CLOSE}][2012/02/07] = 81.4645
RSI[14, {I:Prices CLOSE}][2012/02/08] = 84.3478
RSI[14, {I:Prices CLOSE}][2012/02/09] = 84.7458
RSI[14, {I:Prices CLOSE}][2012/02/10] = 81.8926
RSI[14, {I:Prices CLOSE}][2012/02/13] = 88.1086
RSI[14, {I:Prices CLOSE}][2012/02/14] = 83.4540
RSI[14, {I:Prices CLOSE}][2012/02/15] = 87.0250
RSI[14, {I:Prices CLOSE}][2012/02/16] = 75.9036
RSI[14, {I:Prices CLOSE}][2012/02/17] = 74.6032
RSI[14, {I:Prices CLOSE}][2012/02/20] = 73.7418
RSI[14, {I:Prices CLOSE}][2012/02/21] = 68.9913
RSI[14, {I:Prices CLOSE}][2012/02/22] = 71.0465
RSI[14, {I:Prices CLOSE}][2012/02/23] = 64.1089
RSI[14, {I:Prices CLOSE}][2012/02/24] = 66.4103
RSI[14, {I:Prices CLOSE}][2012/02/29] = 71.3974
RSI[14, {I:Prices CLOSE}][2012/03/01] = 66.0622
RSI[14, {I:Prices CLOSE}][2012/03/02] = 65.2058
RSI[14, {I:Prices CLOSE}][2012/03/03] = 67.4451
RSI[14, {I:Prices CLOSE}][2012/03/05] = 58.6701
RSI[14, {I:Prices CLOSE}][2012/03/06] = 54.3478
RSI[14, {I:Prices CLOSE}][2012/03/07] = 42.5703
RSI[14, {I:Prices CLOSE}][2012/03/08] = 54.8077
RSI[14, {I:Prices CLOSE}][2012/03/09] = 54.9932
RSI[14, {I:Prices CLOSE}][2012/03/12] = 47.7876
RSI[14, {I:Prices CLOSE}][2012/03/13] = 54.8098
RSI[14, {I:Prices CLOSE}][2012/03/14] = 57.2939
RSI[14, {I:Prices CLOSE}][2012/03/15] = 59.3647
RSI[14, {I:Prices CLOSE}][2012/03/16] = 56.3996
RSI[14, {I:Prices CLOSE}][2012/03/19] = 46.1827
RSI[14, {I:Prices CLOSE}][2012/03/20] = 40.8768
RSI[14, {I:Prices CLOSE}][2012/03/21] = 39.6882
RSI[14, {I:Prices CLOSE}][2012/03/22] = 48.0132
RSI[14, {I:Prices CLOSE}][2012/03/23] = 52.4096
RSI[14, {I:Prices CLOSE}][2012/03/26] = 50.6993
RSI[14, {I:Prices CLOSE}][2012/03/27] = 56.6938
RSI[14, {I:Prices CLOSE}][2012/03/28] = 53.3835
RSI[14, {I:Prices CLOSE}][2012/03/29] = 41.6143
RSI[14, {I:Prices CLOSE}][2012/03/30] = 47.9075
RSI[14, {I:Prices CLOSE}][2012/04/02] = 39.7294
RSI[14, {I:Prices CLOSE}][2012/04/03] = 27.0886
RSI[14, {I:Prices CLOSE}][2012/04/05] = 22.6695
RSI[14, {I:Prices CLOSE}][2012/04/06] = 28.9559
RSI[14, {I:Prices CLOSE}][2012/04/09] = 26.5286
RSI[14, {I:Prices CLOSE}][2012/04/10] = 30.8086
RSI[14, {I:Prices CLOSE}][2012/04/11] = 33.1343
RSI[14, {I:Prices CLOSE}][2012/04/12] = 25.2759
RSI[14, {I:Prices CLOSE}][2012/04/13] = 34.1487
RSI[14, {I:Prices CLOSE}][2012/04/16] = 36.9703
RSI[14, {I:Prices CLOSE}][2012/04/17] = 29.3478
RSI[14, {I:Prices CLOSE}][2012/04/18] = 29.9020
RSI[14, {I:Prices CLOSE}][2012/04/19] = 36.2663
RSI[14, {I:Prices CLOSE}][2012/04/20] = 29.6009
RSI[14, {I:Prices CLOSE}][2012/04/23] = 28.9902
RSI[14, {I:Prices CLOSE}][2012/04/24] = 32.7014
RSI[14, {I:Prices CLOSE}][2012/04/25] = 44.6112
RSI[14, {I:Prices CLOSE}][2012/04/26] = 37.5691
RSI[14, {I:Prices CLOSE}][2012/04/27] = 40.2963
RSI[14, {I:Prices CLOSE}][2012/04/30] = 39.0318
RSI[14, {I:Prices CLOSE}][2012/05/02] = 52.1945
RSI[14, {I:Prices CLOSE}][2012/05/03] = 51.2224
RSI[14, {I:Prices CLOSE}][2012/05/04] = 43.6828
RSI[14, {I:Prices CLOSE}][2012/05/07] = 37.7030
RSI[14, {I:Prices CLOSE}][2012/05/08] = 45.4902
RSI[14, {I:Prices CLOSE}][2012/05/09] = 40.0000
RSI[14, {I:Prices CLOSE}][2012/05/10] = 41.9118
RSI[14, {I:Prices CLOSE}][2012/05/11] = 41.1058
RSI[14, {I:Prices CLOSE}][2012/05/14] = 43.1078
RSI[14, {I:Prices CLOSE}][2012/05/15] = 43.6025
RSI[14, {I:Prices CLOSE}][2012/05/16] = 33.9367
RSI[14, {I:Prices CLOSE}][2012/05/17] = 40.1557
RSI[14, {I:Prices CLOSE}][2012/05/18] = 34.8120
RSI[14, {I:Prices CLOSE}][2012/05/21] = 37.1747
RSI[14, {I:Prices CLOSE}][2012/05/22] = 25.7958
RSI[14, {I:Prices CLOSE}][2012/05/23] = 23.7374
RSI[14, {I:Prices CLOSE}][2012/05/24] = 23.2089
RSI[14, {I:Prices CLOSE}][2012/05/25] = 25.4425
RSI[14, {I:Prices CLOSE}][2012/05/28] = 28.3741
RSI[14, {I:Prices CLOSE}][2012/05/29] = 42.0304
RSI[14, {I:Prices CLOSE}][2012/05/30] = 38.6239
RSI[14, {I:Prices CLOSE}][2012/05/31] = 42.3968
RSI[14, {I:Prices CLOSE}][2012/06/01] = 37.8500
RSI[14, {I:Prices CLOSE}][2012/06/04] = 30.4151
RSI[14, {I:Prices CLOSE}][2012/06/05] = 39.1705
RSI[14, {I:Prices CLOSE}][2012/06/06] = 38.1733
RSI[14, {I:Prices CLOSE}][2012/06/07] = 46.1879
RSI[14, {I:Prices CLOSE}][2012/06/08] = 39.8968
RSI[14, {I:Prices CLOSE}][2012/06/11] = 44.2584
RSI[14, {I:Prices CLOSE}][2012/06/12] = 45.1954
RSI[14, {I:Prices CLOSE}][2012/06/13] = 46.7678
RSI[14, {I:Prices CLOSE}][2012/06/14] = 50.4603
RSI[14, {I:Prices CLOSE}][2012/06/15] = 51.7129
RSI[14, {I:Prices CLOSE}][2012/06/18] = 48.7889
RSI[14, {I:Prices CLOSE}][2012/06/19] = 51.4986
RSI[14, {I:Prices CLOSE}][2012/06/20] = 54.2147
RSI[14, {I:Prices CLOSE}][2012/06/21] = 50.6633
RSI[14, {I:Prices CLOSE}][2012/06/22] = 58.1905
RSI[14, {I:Prices CLOSE}][2012/06/25] = 48.7899
RSI[14, {I:Prices CLOSE}][2012/06/26] = 46.3074
RSI[14, {I:Prices CLOSE}][2012/06/27] = 47.0993
RSI[14, {I:Prices CLOSE}][2012/06/28] = 52.4520
RSI[14, {I:Prices CLOSE}][2012/06/29] = 51.1501
RSI[14, {I:Prices CLOSE}][2012/07/02] = 56.7442
RSI[14, {I:Prices CLOSE}][2012/07/03] = 59.6529
:
  • ./backtest.pl TFS 13000 | less
  • ./backtest.pl 'TFS[30,7,7]' 13000 | less

2009年7月2日 星期四

台指期轉檔程式 - Linux Bash

自行到期交所下載交易檔及轉台指期的1分 K 的 bash 程式

這部份是在linux上的shell script程式,配合crontab自動排程
  • Crontab for User
    • 自動排程crontab
    • 編輯 user 的 crontab (執行 crontab -l )
    • 每週 1-5 16:44分,執行這支bash程式(~/prg_bash/cron_proc_tick.bash)
    • crontab 內容
    • # m  h  dom mon dow command
      # 分 時 日 月 周 指令
      44 16 * * 1-5 ~/prg_bash/cron_proc_tick.bash



  • 抓交易檔轉成tick程式
    • 環境: debian linux lenny
    • 程式名稱 : cron_proc_tick.bash
    • 程式目的 : 抓台灣期貨交易所當天交易檔,並分別轉成tick(.csv)
    • BASH 程式碼
    • #!/bin/sh

      # Get Tick

      today_tickfile=http://www.taifex.com.tw/DailyDownload/Daily_`date +%Y_%m_%d`.zip

      wget -c -a ~/tick/prg_bash/rj_crontab.log -P ~/tick/prg_bash/daily/ $today_tickfile


      # Process Tick

      cd ~/tick/prg_bash/daily/

      todayfile=`date +%Y_%m_%d`
      today=`date +%Y%m%d`
      todayMonth=`date +%Y%m`
      zipfile=Daily_$todayfile.zip

      workmonth=./tmp1

      wkproduct=`ls -l Daily_$todayfile.zip | cut -d ' ' -f 5 `

      if [ "$wkproduct" -ne '93' ]; then

      unzip $zipfile

      # echo Daily_$todayfile.rpt
      # echo $todayfile.TX

      # ltd=`tac last-trading-days`
      ltd=`tac ~/tick/last-trading-days`
      for td in $ltd
      do
      #echo "$td="$td , "$today="$today
      if [ "$td" -ge "$today" ]; then
      #echo " $td > $today "
      wkmonth=`echo $td`
      fi
      done

      echo $wkmonth > $workmonth

      wkproduct=`cut -c 1-6 $workmonth`
      # echo $wkproduct


      # TX 台指
      head -n 1 Daily_$todayfile.rpt > $todayfile.TX
      sed '/MTX/d' Daily_$todayfile.rpt | sed -n '/TX/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6/2 }' >> $todayfile.TX
      echo "TickTime,Price,Vol" > txf$today.csv
      sed '/MTX/d' Daily_$todayfile.rpt | sed -n '/TX/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $4,$5,$6/2 }' >> txf$today.csv

      # MTX 小台
      head -n 1 Daily_$todayfile.rpt > $todayfile.MTX
      sed -n '/MTX/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6/2 }' >> $todayfile.MTX
      echo "TickTime,Price,Vol" > mxf$today.csv
      sed -n '/MTX/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $4,$5,$6/2 }' >> mxf$today.csv


      # TE 電指期
      head -n 1 Daily_$todayfile.rpt > $todayfile.TE
      sed -n '/TE/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6/2 }' >> $todayfile.TE
      echo "TickTime,Price,Vol" > exf$today.csv
      sed -n '/TE/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $4,$5,$6/2 }' >> exf$today.csv

      ## TF 金指期
      head -n 1 Daily_$todayfile.rpt > $todayfile.TF
      sed '/GTF/d' Daily_$todayfile.rpt | sed -n '/TF/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6/2 }' >> $todayfile.TF
      echo "TickTime,Price,Vol" > fxf$today.csv
      sed '/GTF/d' Daily_$todayfile.rpt | sed -n '/TF/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $4,$5,$6/2 }' >> fxf$today.csv

      rm $workmonth


      if [ ! -d $todayMonth ]; then
      mkdir $todayMonth
      fi
      mv Daily_$todayfile.rpt $zipfile $todayMonth/

      if [ ! -d "~/tick/prg_bash/tick/$todayMonth" ]; then
      mkdir ~/tick/prg_bash/tick/$todayMonth
      fi
      mv $todayfile.TX txf$today.csv $todayfile.MTX mxf$today.csv $todayfile.TE exf$today.csv $todayfile.TF fxf$today.csv ~/tick/prg_bash/tick/$todayMonth/

      fi


參考我的 wiki : Get Taiwan future tick - cron_proc_tick.bash


2009年5月6日 星期三

定時自動抓期交所的成交資料(續)

前一篇 定時自動抓期交所的成交資料 測試結果很好, 唯一有問題是商品有GTF沒考慮進去, 現在已修改了。

這個定時抓當天成交資料, 並分拆成多個檔, 是個很不錯的用 crontab 定時跑的script
, 是可以放在主機上, 每天定時跑出結果, 並分享給要用的人, 只是我的頻寬會影響到, 我可不希望在看盤時有太多人來抓, 所以不考慮掛在我家中主機上, 有需要的人, 自行按前篇 定時自動抓期交所的成交資料 建置 , 需要幫助的, 請寄E-Mail給我, 或有人有主機, 可以讓我放上去, 造褔要每天抓的人。

另外看tick發現對程式下單有影響的問題



開盤前掛好單, 在08:45:00當下超過兩百筆的交易, 若要用程式抓, 可能(應當)會有些抓不到, 報價資料源,網路,電腦,程式等, 這幾個配合幾乎是不可能全抓到 :
  • 報價資料源無法控制
  • 網路頻寬可以申請T3的
  • 要用期交所同等及的電腦, 超過成本太多(高)了
  • 程式可以調整
除了08:45:00這秒外, 大部份每秒不超過 40 個 Tick, 用 30次/秒去抓, 大概就可以了, 只是不知其他人寫的自動下單, 要用到Tick來處嗎? 還是用策略去避開這個問題。
  • 2009-05-06 08:45:00 的 Tick - 337 筆
  • 2009-05-05 08:45:00 的 Tick - 254 筆
  • 2009-05-04 08:45:00 的 Tick - 71 筆
還有就是 - 太多有錢人了, 開盤 Tick 單筆有 300 的量, 100及200也不少, 我只有用小台, 要怎麼玩得過別人(大戶)

以下是台指的三天部分片斷
2009_05_06.TX
交易日期,商品代號,交割年月,成交時間,成交價格,成交數量(B+S)
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,6
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,40
20090506,TX,200905,08450000,6510,40
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,12
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,30
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,6
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,6
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,6
20090506,TX,200905,08450000,6510,6
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,60
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,10
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,4
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6510,2
20090506,TX,200905,08450000,6511,2
20090506,TX,200905,08450000,6512,4
20090506,TX,200905,08450000,6509,2
20090506,TX,200905,08450100,6513,2
20090506,TX,200905,08450100,6511,2
20090506,TX,200905,08450200,6515,2
20090506,TX,200905,08450200,6512,4
20090506,TX,200905,08450200,6508,4



交易日期,商品代號,交割年月,成交時間,成交價格,成交數量(B+S)
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,44
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,40
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,116
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,30
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,14
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,8
20090505,TX,200905,08450000,6637,24
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,8
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,50
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,16
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,8
20090505,TX,200905,08450000,6637,14
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,200
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,16
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,30
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,40
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,8
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,8
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,60
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,24
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,12
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,10
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,6
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,20
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,100
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,4
20090505,TX,200905,08450000,6637,2
20090505,TX,200905,08450000,6638,2
20090505,TX,200905,08450000,6640,2
20090505,TX,200905,08450000,6640,2
20090505,TX,200905,08450000,6645,4
20090505,TX,200905,08450000,6645,2
20090505,TX,200905,08450000,6647,4
20090505,TX,200905,08450000,6647,2
20090505,TX,200905,08450000,6648,2
20090505,TX,200905,08450000,6648,4
20090505,TX,200905,08450000,6648,6
20090505,TX,200905,08450000,6648,4
20090505,TX,200905,08450000,6648,2
20090505,TX,200905,08450000,6648,10
20090505,TX,200905,08450000,6648,4
20090505,TX,200905,08450000,6648,2
20090505,TX,200905,08450000,6649,4
20090505,TX,200905,08450000,6649,2
20090505,TX,200905,08450000,6649,2
20090505,TX,200905,08450000,6649,2
20090505,TX,200905,08450000,6649,10
20090505,TX,200905,08450000,6649,4
20090505,TX,200905,08450000,6649,2
20090505,TX,200905,08450100,6649,16
20090505,TX,200905,08450100,6649,6
20090505,TX,200905,08450200,6649,6
20090505,TX,200905,08450200,6649,4
20090505,TX,200905,08450200,6649,2
20090505,TX,200905,08450200,6649,8
20090505,TX,200905,08450200,6649,8
20090505,TX,200905,08450200,6649,4
20090505,TX,200905,08450200,6649,6
20090505,TX,200905,08450200,6649,2
20090505,TX,200905,08450200,6649,4
20090505,TX,200905,08450300,6649,2
20090505,TX,200905,08450300,6649,12
20090505,TX,200905,08450300,6649,2
20090505,TX,200905,08450300,6650,2
20090505,TX,200905,08450300,6650,36
20090505,TX,200905,08450300,6650,2
20090505,TX,200905,08450300,6650,2
20090505,TX,200905,08450400,6650,50
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450400,6650,36
20090505,TX,200905,08450400,6650,6
20090505,TX,200905,08450400,6648,6
20090505,TX,200905,08450400,6648,4
20090505,TX,200905,08450400,6650,4
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450400,6648,4
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450400,6648,2
20090505,TX,200905,08450400,6646,2
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450400,6650,12
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450400,6650,2
20090505,TX,200905,08450500,6646,2
20090505,TX,200905,08450500,6646,2
20090505,TX,200905,08450500,6648,2
20090505,TX,200905,08450500,6648,16
20090505,TX,200905,08450500,6650,20
20090505,TX,200905,08450500,6650,58
20090505,TX,200905,08450500,6652,2
20090505,TX,200905,08450500,6651,2
20090505,TX,200905,08450500,6652,4
20090505,TX,200905,08450500,6652,2
20090505,TX,200905,08450500,6652,2
20090505,TX,200905,08450600,6652,2
20090505,TX,200905,08450600,6651,2
20090505,TX,200905,08450600,6658,2
20090505,TX,200905,08450600,6659,2



交易日期,商品代號,交割年月,成交時間,成交價格,成交數量(B+S)
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,16
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,20
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,200
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,26
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,8
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,18
20090504,TX,200905,08450000,6363,200
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,14
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,16
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,40
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,20
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,8
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,20
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,8
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,8
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,40
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,30
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,30
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,12
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,26
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,126
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,180
20090504,TX,200905,08450000,6363,16
20090504,TX,200905,08450000,6363,102
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,120
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,12
20090504,TX,200905,08450000,6363,62
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,40
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,20
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,14
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,100
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,12
20090504,TX,200905,08450000,6363,4
20090504,TX,200905,08450000,6363,6
20090504,TX,200905,08450000,6363,2
20090504,TX,200905,08450000,6363,10
20090504,TX,200905,08450000,6358,2
20090504,TX,200905,08450000,6351,2
20090504,TX,200905,08450000,6350,4
20090504,TX,200905,08450000,6350,2
20090504,TX,200905,08450100,6350,2
20090504,TX,200905,08450100,6336,2
20090504,TX,200905,08450100,6335,2
20090504,TX,200905,08450100,6321,4
20090504,TX,200905,08450100,6350,2
20090504,TX,200905,08450100,6350,6
20090504,TX,200905,08450100,6359,6
20090504,TX,200905,08450200,6362,4
20090504,TX,200905,08450200,6362,2
20090504,TX,200905,08450200,6362,2
20090504,TX,200905,08450200,6352,18
20090504,TX,200905,08450200,6315,2
20090504,TX,200905,08450200,6350,2
20090504,TX,200905,08450200,6357,2
20090504,TX,200905,08450200,6359,2
20090504,TX,200905,08450200,6359,2
20090504,TX,200905,08450200,6349,8
20090504,TX,200905,08450200,6359,10
20090504,TX,200905,08450200,6359,2
20090504,TX,200905,08450200,6362,2
20090504,TX,200905,08450300,6348,2
20090504,TX,200905,08450300,6348,2
20090504,TX,200905,08450300,6348,2
20090504,TX,200905,08450300,6315,2
20090504,TX,200905,08450300,6315,8
20090504,TX,200905,08450300,6348,2
20090504,TX,200905,08450300,6357,2
20090504,TX,200905,08450300,6357,2
20090504,TX,200905,08450300,6357,4
20090504,TX,200905,08450300,6357,2
20090504,TX,200905,08450300,6357,2
20090504,TX,200905,08450300,6357,2
20090504,TX,200905,08450300,6352,8
20090504,TX,200905,08450300,6345,2
20090504,TX,200905,08450300,6349,2
20090504,TX,200905,08450300,6349,2
20090504,TX,200905,08450300,6349,2
20090504,TX,200905,08450300,6349,2
20090504,TX,200905,08450300,6356,2
20090504,TX,200905,08450300,6356,2
20090504,TX,200905,08450400,6345,2
20090504,TX,200905,08450400,6345,2
20090504,TX,200905,08450400,6353,2
20090504,TX,200905,08450400,6313,2
20090504,TX,200905,08450400,6313,2
20090504,TX,200905,08450400,6310,2

2009年5月1日 星期五

定時自動抓期交所的成交資料

這幾天在趕程式, 空時看 程式交易聚寶盆 的文章, 其中有下載當天(最近30天)的成交資料, 要每天去抓, 覺得不方便。

昨天五月一日(星期五)沒交易, 在自家的主機(Debian)上, 用shell script 配合crontab寫了每天(星期一至星期五)16:30左右, 自動到期交所抓當天成交資料, 並分拆成台指, 小台指, 金指期, 電指期的tick檔, 下星期開始跑, 先暫時這樣。

這個程式只取當期(近月)的tick, 若是4月29日當天,會做以下動作
  • 到期交所抓當天成交資料(Daily_2009_04_29.zip)
  • 解Daily_2009_04_29.zip成Daily_2009_04_29.rpt
  • 參考最後結算日檔(last-trading-days)取出近月tick, 並分成台指, 小台指, 金指期, 電指期,及產生2009_04_29.TX , 2009_04_29.MTX , 2009_04_29.TF , 2009_04_29.TE 四個檔



待處理
  • 還沒有統計成1分鐘K,
  • 及改成perl寫的程式
  • 合併到原有的K線中


用 wget 下載的 script - wget-future-tick

#!/bin/sh

today_tickfile=http://www.taifex.com.tw/DailyDownload/Daily_`date +%Y_%m_%d`.zip

wget -c -a /daily/future_tick.log -P /daily/ $today_tickfile




分拆成台指,小台指,金指期,電指期的 script - proc-tick

#!/bin/sh

todayfile=`date +%Y_%m_%d` # -> 2009_04_29
today=`date +%Y%m%d` # -> 20090429
zipfile=Daily_$todayfile.zip # -> Daily_2009_04_29.zip

workmonth=./tmp1 # 暫存用

# 取得下載檔 size
filesize=`ls -l Daily_$todayfile.zip | cut -d ' ' -f 5 `

if [ "$filesize" -ne '93' ]; then # 超過 93 才有資料

unzip $zipfile # 解zip

# echo Daily_$todayfile.rpt
# echo $todayfile.TX

ltd=`tac last-trading-days` # 最後結算日檔
for td in $ltd
do
#echo "$td="$td , "$today="$today
if [ "$td" -ge "$today" ]; then
#echo " $td > $today "
wkmonth=`echo $td` # 取得最近的結算日 -> wkmonth
fi
done

echo $wkmonth > $workmonth

wkproduct=`cut -c 1-6 $workmonth` # 當期交易商品月份
# echo $wkproduct

# 用 sed 及 awk 分拆檔案
# TX 台指
head -n 1 Daily_$todayfile.rpt > $todayfile.TX # 留表頭第一行
sed '/MTX/d' Daily_$todayfile.rpt | sed -n '/TX/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6 }' >> $todayfile.TX

# MTX 小台
head -n 1 Daily_$todayfile.rpt > $todayfile.MTX
sed -n '/MTX/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6 }' >> $todayfile.MTX

# TE 電指期
head -n 1 Daily_$todayfile.rpt > $todayfile.TE
sed -n '/TE/p' Daily_$todayfile.rpt | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6 }' >> $todayfile.TE

## TF 金指期
head -n 1 Daily_$todayfile.rpt > $todayfile.TF
sed '/GTF/d' Daily_$todayfile.rpt | sed -n '/TF/p' | sed -n 's/ //gp' | awk -F, 'BEGIN{OFS=","}($3=='$wkproduct'){ print $1,$2,$3,$4,$5,$6 }' >> $todayfile.TF

rm $workmonth # 刪除暫存檔
fi


crontab中的內容

# 分 時 日 月 星期 要執行的指令
34 16 * * 1-5 redjoetseng cd /daily/ && run-parts /etc/cron.tick/01get/wget-future-tick #每天抓future成交記錄
44 16 * * 1-5 redjoetseng cd /daily/ && run-parts /etc/cron.tick/02proc/proc-tick #依商品分拆future成交記錄


註:
  1. windows下也有crontab 排程(自動執行)程式 - CRONw
  2. 修改金指期(TF)部份,有GTF要除掉。(2009-05-06)



台灣期交所下載網頁

聯絡表單

名稱

以電子郵件傳送 *

訊息 *