2011年4月29日 星期五

GeniusTrader @ perl

TradeStation的交易系統上, 可以寫簡單的 Easy Language 做系統的回測分析. 可參考大象飛上天,裡面有很多簡單的例子.不過你需要先有 TradeStation 這套付錢的軟體. 這對Free Software的人來說真是太困難了. 還好有 GeniusTrader, 透過內建的 Indicator, money management...下些簡單的 Script commands, 可以模擬出類似 TradeStation 的 Chart 跟 Report 呢. GeniusTrader support 1.backtrack history data insert .txt 2.real time quote from Yahoo finance DBI:SQLite3, MySQL, 3. indicator support DMA,KD,... 5. money management & profit report hold time, max benefit, max lost. 可參考底下的安裝流程. http://geniustrader.org/first_use.html ps: 記得設定 GeniusTrader 的 system 變數 @ ~/.gt/options
DB::module Text
DB::text::directory /home/sean/prj/geniustrader/data
# relying on DB::Text defaults for sample database access

Brokers::module SelfTrade

Path::Font::Arial    /usr/share/fonts/truetype/msttcorefonts/arial.ttf
Path::Font::Courier  /usr/share/fonts/truetype/msttcorefonts/couri.ttf
Path::Font::Times    /usr/share/fonts/truetype/msttcorefonts/times.ttf

Analysis::ReferenceTimeFrame year

#Graphic::BackgroundColor black
#Graphic::ForegroundColor white

Aliases::Global::TFS    SY:TFS 50 10|CS:SY:TFS
Aliases::Global::TFS[]  SY:TFS #1 #2|CS:SY:TFS #1|CS:Stop:Fixed #3
ps: @ ex1 有沒有像 TradeStation 內的 Easy Language 阿.不過好像沒有 TradeStation那麼簡單. 全部是 GUI 的介面. 要跑回測要用 backtest.pl. 要圖形跑 graphic.pl. Run Mode 設定要修改 DB::module @ ~/.gt/options....還有一堆 script 要下,當然最大的特點是可以加入自己的想法到 library 中. 不過還是要找到適合自己的交易工具才重要. @ ex1
CS:Generic \
{S:Generic:CrossOverDown {I:DMI/3 14} 12 } \
{S:Generic:CrossOverUp   {I:DMI/3 14} -12 }
Ref: http://www.geniustrader.org/ https://help.ubuntu.com/8.04/serverguide/C/postgresql.html

沒有留言:

張貼留言