📄 mktstats.h
字号:
// Tim Jares -- MktStats.h // This include file defines the characteristics of the MktStats// in this market simulation. This is where mkt stats are collected// and traders who care can ask for reports. #import <objectbase/SwarmObject.h>#import <analysis/EZBin.h>#import <collections.h>#import "MktData.h"#import "Define.h"@interface MktStats: SwarmObject { double riskyPrice; double riskLessPrice; int periods; // number of periods so far int numEarningsRpts; int numRiskLessCFs; double riskyPTotal; // grand total of risky prices over time double riskLessPTotal; // total of riskless prices over time double riskyCFTotal; double earningsTotal; double riskLessCFTotal; double riskyPrices[HISTORYMAX]; // history of risky prices double riskyVol[HISTORYMAX]; // history of risky price volume double fundPrices[HISTORYMAX]; // history of risky prices (fund) double riskyCFs[HISTORYMAX]; // history of earnings (daily entries) double earnings[HISTORYMAX]; // history of earnings (qtly entries) double riskLessPrices[HISTORYMAX]; // history of riskLess prices double riskLessCFs[HISTORYMAX]; // history of dividends double avgRiskyPrice; // average risky price (forever) double avgRiskLessPrice; // avg riskless price (forever) double avgRiskyCF; double avgEarnings; double avgRiskLessCF; int diagLevel; id mktDataList; // collection of past risky prices, CFs id priceBin; // risky price histogram id riskyRetBin; // risky return histogram id riskyVolBin; // risky volume histogram}// MktStats methods-initHistory;//-addRiskyPrice: (int) riskyP RiskLessPrice: (int) riskLessP;-addPrices: (double) riskyP : (double) riskLessP; -addEarnings: (double) e;-addRiskLessCF: (double) riskLessCF : (double) riskyCF;-addVol: (double) v;-addFundPrice: (double) p;-(double) getRiskyMovingAvg: (int) periods;-(double) getRiskLessMovingAvg: (int) periods;-(double) getRiskyLagPrice: (int) lags;-(double) getRiskyRetVar;-(double) getRiskyLagCF: (int) lags;-(double) getEarningsLag: (int) lags;-(double) getRiskyPrice;-(double) getRiskyVol;-(double) getRiskyCF;-(double) getFundPrice;-(double) getRiskLessLagPrice: (int) lags;-(double) getRiskLessLagCF: (int) lags;-(int) getPeriod;-setDiagLevel: (int) l;-step;-collectRiskyVolStats;-(double) getRiskyVolAvg;-(double) getRiskyVolStd;-collectRiskyRetStats;-(double) getRiskyRetAvg;-(double) getRiskyRetStd;-print;@end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -