📄 agentvariants.java
字号:
package asm;/** * Title: Artificial Stock Market * Description: 人工模拟股市(来源:SFI的Swarm版本)的Java版本 * Copyright: Copyright (c) 2003 * Company: http://agents.yeah.net * @author jake * @version 1.0 */public class AgentVariants { public double demand; /*" bid or -offer"*/ public double profit; /*" exp-weighted moving average "*/ public double wealth; /*" total agent wealth "*/ public double position; /*" total shares of stock "*/ public double cash; /*" total agent cash position "*/ public int currentTime; /*"The agent regularly checks with Swarm to see what time it is"*/ public double avspecificity; /*'average specificity of active forecasts"*/ public double forecast; /*"prediction of stock price: (trialprice+dividend)*pdcoeff + offset."*/ public double global_mean; /*"price+dividend"*/ public double realDeviation; /*" ftarget-lforecast: how far off was the agent's forecast?"*/ public double variance; /*"an Exp.Weighted MA of the agent's historical variance: Combine the old variance with deviation^squared, as in: bv*variance + av*deviation*deviation"*/ public double pdcoeff; /*" coefficient used in predicting stock price, recalculated each period in prepareForTrading"*/ public double offset; /*" coefficient used in predicting stock price, recalculated each period in prepareForTrading"*/ public double divisor; /*" a coefficient used to calculate demand for stock. It is a proportion (lambda) of forecastvar (basically, accuracy of forecasts)"*/ public int gacount; public AgentVariants() { }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -