AioTrade Investigation (Section C: Basic Data Type in AioTrade)
guibin.beijing@gmail.com
AioTrade source code:
https://github.com/dcaoyuan/aiotrade
1. TVal
org.aiotrade.lib.math.timeseries.TVal represents a cross section view at some specific time.
Please keep this idea in mind, it is the basic concept in this AioTrade system. Each TVal has three common attributes:
data, uniSymbol and sec. For example, the org.aiotrade.lib.securities.model.
LightTicker is a kind of TVal. At the specific time(LightTicker.time),
LighterTicker has the 8 data for one uniSymbol, they are prevClose, lastPrice, dayOpen, dayHigh, dayLow, dayVolume, dayAmount, dayChange.
In AioTrade, the org.aiotrade.lib.securities.model.
MoneyFlow, org.aiotrade.lib.securities.model.
Quote are all TVal. And
Ticker is subclass of LightTicker, also a TVal. org.aiotrade.lib.securities.
TickerSnapshot is subclass of Ticker, of course a TVal.
At the specific time,
MoneyFlow has 24 data, they are totalVolumeIn, totalAmountIn, totalVolumeOut, totalAmountOut, totalVolumeEven, totalAmountEven, superVolumeIn, superAmountIn, superVolumeOut, superAmountOut, superVolumeEven, superAmountEven, largeVolumeIn, largeAmountIn, largeVolumeOut, largeAmountOut, largeVolumeEven, largeAmountEven, smallVolumeIn, smallAmountIn, smallVolumeOut, smallAmountOut, smallVolumeEven, smallAmountEven;
Quote has 7 data, they are open, high, low, close, volume, amount and vwap.
2. TSer
org.aiotrade.lib.math.timeseries.TSer represents Time Series, namely a series of Time related values.
Please keep this idea in mind, it is another basic concept in this AioTrade system. Actually, org.aiotrade.lib.securities.
QuoteSer and org.aiotrade.lib.securities.
MoneyFlowSer are all TSer. These Tser are all consisted of three common attributes:
freq, vars and timestamps. Because we use TSer as a basic data structure to describe a series of time related values, such as a K line(candle sticks), the K line must have a frequence: minutely, hourly, daily, monthly, yearly and so on. With a specific frequence, the TSer must have some values base on the frequence, and must have a time axis to let all the values align.
The chart above describes the relationship between TSer and the TVar, TimeStamp.
All the values(namely TVar) in one TSer share a common TimeStamp. TSer defines the method timestamps to get the TimeStamp. In AioTrade system, the member TimeStamp is actually defined in DefaultTSer.
org.aiotrade.lib.securities.
QuoteSer and org.aiotrade.lib.securities.
MoneyFlowSer are two kinds of actual TSer.
QuoteSer has 9 TVars, they are open, high, low, close, volume, amount, close_adj, close_ori, isClosed. isClose means: if it is minutely QuoteSer and currently it is 9:31:01, the isClose(9:31:00) keeps false until 9:31:59. When it is 9:32:00, the isClose(9:31:00) become true.
That means the TVar(9:31:00) has been close, it moves to the next minute.
MoneyFlowSer has 32 TVars, they are totalVolume, totalAmount, totalVolumeIn, totalAmountIn, totalVolumeOut, totalAmountOut, totalVolumeEven, totalAmountEven, superVolume, superAmount, superVolumeIn, superAmountIn, superVolumeOut, superAmountOut, superVolumeEven, superAmountEven, largeVolume, largeAmount, largeVolumeIn, largeAmountIn, largeVolumeOut, largeAmountOut, largeVolumeEven, largeAmountEven, smallVolume, smallAmount, smallVolumeIn, smallAmountIn, smallVolumeOut, smallAmountOut, smallVolumeEven, smallAmountEven
3. TVar
org.aiotrade.lib.math.timeseries.
TVar represents the horizontal view of TSer.
A TSer consists of several TVars. Each TVar is a series, and each TVar has a timestamps. Each TVar gets it's own timestamp via the method "
def timestamps: TStamps", but in TSer, these TVars share a common timestamp in order to save memory space. TSer use the method "
def attach(timestamps: TStamps)" which is implemented in org.aiotrade.lib.math.timeseries.
DefaultTSer to share the timestamp. For instance, in AioTrade system, Indicator invokes
attach(baseSer.timestamps) to share the timestamp with baseSer, Function also invokes
attach(baseSer.timestamps) to share the timestamp with baseSer.
Basicly, the share timestamp logic can be found in the
def timestamps = DefaultTSer.this.timestamps of DefaultTSer.AbstractInnerTVar.
- 大小: 41.5 KB
分享到:
相关推荐
电泳沉积法制备SnO2:Ti 复合纳米线阵列及其气敏性质研究,李建军,朱金波,通过电泳沉积法与阳极氧化铝模板相结合可控制备出高度有序的Sn0.96Ti0.04O复合纳米线阵列。系统的结构表征显示所得SnO2:Ti复合纳米线�
Descriptive: studies involving the collection of data in order to test hypotheses or to answer questions concerning the current status of the subjects of the study. Exploratory: studies conducted ...
Investigation of Threshold Voltage Distribution Temperature Dependence in 3D NAND Flash
Big Data forensics is an important type of digital investigation that involves the identification, collection, and analysis of large-scale Big Data systems. Hadoop is one of the most popular Big Data ...
An Investigation in Implementing a C++ Voxel Game Engine with Destructible Terrain In video games today, world geometry is often represented as a polygon mesh. While this representation is able to ...
藏经阁-NLP Structured Data Investigation on Non-Text.pdf
p型补偿直拉硅中硼氧复合体的研究,吴以超,余学功,本文研究了p型补偿直拉硅单晶中引起电池光衰减效应的硼氧复合体的性质。通过采用双指数函数拟合的方法,发现硼氧复合体的慢过程�
Investigation of Layered Bismuthates: (Ba, K)3Bi2O7 and (Ba, K)2BiO4 Schichtförmige Manganate Poster Investigation of Layered Bismuthates: (Ba,K)3Bi2O7 and (Ba,K)2BiO4 N. R. Khasanovaa, M. L. ...
He is a regular writer for developer journals such as Inside Visual Basic, ASPToday, and Hardcore Visual Studio .NET, and he’s the author of several books about programming with .NET, including User ...
《Vision:A Computational Investigation into the Human Representation and Processing of Visual Information》,计算机视觉奠基之作
This textbook teaches advanced undergraduate and first-year graduate students in Engineering and Applied Sciences to gather and analyze empirical observations (data) in order to aid in making design ...
TEMS 14.2更新说明 TEMS Investigation 14.2 Release Note
非对称孤岛工作面覆岩运动特征的微震监测研究,刘张立,牟宗龙,基于关键层理论,对某矿10302非对称孤岛工作面上覆岩层结构特征进行了分析,并采用微震监测技术对随工作面回采巨厚上覆岩层破裂运�
### Data Set Information: > The two datasets are related to red and white variants of the Portuguese "Vinho Verde" wine. For more details, consult: [Web Link] or the reference [Cortez et al., 2009]....
opti-scan+Investigation+7.4.3.0+-+Internal+until+2018.10.01
Title: An Investigation of the Laws of Thought Author: George Boole Release Date: July 19, 2017
详细的介绍了TEMS INVESTIGATION的最新功能
This monograph attempts such an investigation in the case of two basic predicates: the counterclockwise relation pqr, which states that the circle through points (p, q, r) is traversed ...
An investigation of the Iowa tests of basic skills for sex bias: A developmental look AN INVESTIGATION OF THE IOWA TESTS OF BASIC SKILLS FOR SEX BIAS: A DEVELOPMENTAL LOOK BARBARA S . PLAKE ...
Modeling and Simulation Techniques in Structural Engineering (Advances in Civil and Industrial Engineering) By 作者: Pijush Samui ISBN-10 书号: 1522505881 ISBN-13 书号: 9781522505884 Edition 版本: 1 ...