全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
3260 8
2012-12-24
最近完成了SAS回溯系统的架构和底层demo,自己摸索着总共有四大模块,然后通过统一标准的策略编辑窗口就可以实现策略的回溯代码了。
1、数据通信(Loading Data API.sas
2、信号检测(Long And Short API.sas
3、模拟交易(Calculation Performance API.sas
4、绩效报告(Performance Report API.sas


这四个模块初具成形,但还有待提高。系统介绍如下:
|*****************The Information of SAS Back Trading System****************|
|--Description--------------------------------------------------------------|
|       This is a Programming Trading Back System that provide accurate     |
|  back transaction record executive bag and detailed transaction report    |
|  package,applicable to all kinds of securities.                           |
|                                                                           |
|--Routine Package----------------------------------------------------------|
|       1. Loading Data API.sas                                             |
|       2. Long And Short API.sas                                           |
|       3. Calculation Performance API.sas                                  |
|       4. Performance Report API.sas                                       |
|                                                                           |
|--Loading Data API.sas-----------------------------------------------------|
|       This routine package contains three Macro Programs,Their main task  |
|  is to read dataset.Three Macro Program name are  LoadingDataAlone(1),    |
|  LoadingDataMore(2) and LoadingDataFromYahoo(3) respectively,Now to       |
|  describe their usage.                                                    |
|  (1)LoadingDataAlone(Dir=,DataTableType=,Library=,DataSetName=,getnames=) |
|  Call methods:                                                            |
|    % LoadingDataAlone(                                                    |
|        Dir = "C:\Documents\IF300.csv",                                    |
|        DataTableType = csv,                                               |
|        Library =work,                                                     |
|        DataSetName = a4,                                                  |
|        getnames = yes )                                                   |
|  Each variable meaning:Dir外部数据表的路径 DataTableType数据类型          |
|   Library逻辑库名 DataSetName输出数据集名称 getnames是否读入变量名YES NO  |
|  (2) LoadingDataMore(dir= ,Library = )                                    |
|  Call methods:                                                            |
|    % LoadingDataMore( dir=E:\期货EXCEL表,Library =work )                  |
|  (3)LoadingDataFromYahoo(code=, start=, end=, prompt=NO)                  |
|  Call methods:                                                            |
|    % LoadingDataFromYahoo(code=000001.SZ, start=1/1/2005, end=11/16/2012) |
|  Each variable meaning:code为股票代码,美票不用加后缀,深市代码后加.SZ,     |
|  沪市代码后加.SS,如000001.SZ为深发展代码.start和end分别为起止日期,格式为  |
|  mm/dd/yyyy .prompt:是否弹出窗口输入上述参数(一般为NO)                    |
|                                                                           |
|--Long And Short API.sas---------------------------------------------------|
|        This routine package contains eight Macro Programs,their main task |
|  is to detection trading signal in market.Now to describe their usage.    |
|  (1)OpenLong(BuyPrice = )                                                 |
|        This is a Macro that opening Long Position.                        |
|  (2)OpenShort(SellShortPrice = )                                          |
|        This is a Macro that opening Short Position.                       |
|  (3)CloseLong(SellPrice = )                                               |
|        This is a Macro that closing Long Position.                        |
|  (4)CloseShort(BuytoCoverPrice = )                                        |
|        This is a Macro that closing Short Position.                       |
|  (5)CloseLongAndOpenShort(SellPrice = ,SellShortPrice = )                 |
|        This is a Macro that closing Long and opening Short Position.      |
|  (6)CloseShortAndOpenLong(BuytoCoverPrice = , BuyPrice = )                |
|        This is a Macro that closing Short and opening Long Position.      |
|  (7)ForceCloseLong(SellPrice = )                                          |
|        This is a Macro that force closing Long Position.                  |
|  (8)ForceCloseShort(BuytoCoverPrice = )                                   |
|        This is a Macro that force closing Short Position.                 |
|                                                                           |
|--Calculation Performance API.sas------------------------------------------|
|        This routine package contains one Macro Program,it main task is to |
|  place an order and excution simulation trade in market.This Macro need   |
|  to use macro variable -Short- to specify strategy have shorting mechanism|
|  Now to describe it usage.                                                |
|  Call methods:                                                            |
|    % computePerformace(Short = NO)                                        |
|  Note: The strategy have no shorting mechanism then variable Short to be  |
|  set NO,and they have shorting mechanism then Short to be set YES must.   |


策略编辑界面:
复制代码


SAS画K线图.jpg


/*还请感兴趣的人士,讨论我的方案可行性*/


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-12-25 13:14:36
LangAndShort API的代码:
复制代码
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-25 13:26:15
很有意义的项目!希望能坚持做下去!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-25 13:52:26
davil2000 发表于 2012-12-25 13:26
很有意义的项目!希望能坚持做下去!
不过,用SAS做回溯系统好像没有太多人看好啊,自己的SAS水平不高,好多资源都学习不到。感觉自己闭门造车了...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-25 13:58:19
站在SAS巨人的肩膀上。这个比较C++的平台会更有价值!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-25 14:04:45
davil2000 发表于 2012-12-25 13:58
站在SAS巨人的肩膀上。这个比较C++的平台会更有价值!
嗯,希望自己会取得应有的成绩!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群