<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="UAgentForm.xsl" ?>
<!DOCTYPE ApplicationForm SYSTEM "UAgentForm.dtd">

<ApplicationForm>
		<TeamName>
			<!-- Team Name -->
			U-Mart Project
		</TeamName>
		<Copyright>
			(c)2000 Rikiya FUKUMOTO
		</Copyright>
		<Copyright>
			(c)2002 U-Mart Project
		</Copyright>
		<Producer>
			<!-- All Producers should be written -->
			<Name>
				Yuji KAWABE
			</Name>
			<Affiliation>
				Dept. of Information Science and Intelligent Systems, 
        Faculty of Engineering, The University of Tokushima
			</Affiliation>
			<Address>
				2-1 Minamijosanjima, Tokushima, Tokushima, 770-8506, Japan.
			</Address>
			<Phone>
				+81-88-656-9139
			</Phone>
			<Fax>
				+81-88-656-9139
			</Fax>
			<Email>
				yuuji@is.tokushima-u.ac.jp
			</Email>
			<URL>			
			</URL>
		</Producer>
		<Producer>
			<!-- All Producers should be written -->
			<Name>
				Isao ONO
			</Name>
			<Affiliation>
				Dept. of Information Science and Intelligent Systems, 
        Faculty of Engineering, The University of Tokushima
			</Affiliation>
			<Address>
				2-1 Minamijosanjima, Tokushima, Tokushima, 770-8506, Japan.
			</Address>
			<Phone>
				+81-88-656-9139
			</Phone>
			<Fax>
				+81-88-656-9139
			</Fax>
			<Email>
				isao@is.tokushima-u.ac.jp
			</Email>
			<URL>			
			</URL>
		</Producer>
		<Producer>
			<!-- All Producers should be written -->
			<Name>
				Hajime KITA
			</Name>
			<Affiliation>
				National Institution for Academic Degree
			</Affiliation>
			<Address>
				3-29-1 Ootsuka, Bunkyo, Tokyo, 112-0012, Japan.
			</Address>
			<Phone>
				+81-3-3942-9972
			</Phone>
			<Fax>
				+81-3-3942-9972
			</Fax>
			<Email>
				kita@niad.ac.jp
			</Email>
			<URL>			
			</URL>
		</Producer>
		<Agent>
			<AgentName>
				AntiTrend Trader
			</AgentName>
			<Summary>
				price1=last futures price, and price2= second last futures price.
				If price1 is lower than price2 then the agent orders buying.
				If price1 is higher than price2 then the agent orders selling.
				The amount of order is randomly desided.				
			</Summary>
		<ExecutionAndArguments>
			<!-- Command and arguments for the experiment-->
 				according as TestStrategy.java 
		</ExecutionAndArguments>
		<SummaryOfArguments>
				according as TestStrategy.java 
		</SummaryOfArguments>
			<Type>
				<!-- To charactalize the agent, please answer following items. -->
				<Tool>
					<!-- distributed program used or based on the agent-->
					<!-- TestStrategy.java, SampleStrategy.java or 
					CProcotol.java -->
					Strategy.java 
				</Tool>
				<NumberOfOrders>
					<!-- How many orders the agent sends to server at one session-->
					1
				</NumberOfOrders>
				<MarketOrLimit>
					<!-- Dose the agent order by limit price or market price? -->
					Limit Price
				</MarketOrLimit>
				<AssetManagement>
					<!-- Dose the agent manage it's own asset? -->
					Yes
				</AssetManagement>
				<ReferenceData>
					<!-- Please list data that the agent uses. -->
				futures price, spot price, position, cash, remaining session
				</ReferenceData>
				<LongOrShortTerm>
					<!-- Which is the agent long term or short term trader? -->
					Short
				</LongOrShortTerm>
				<AgainstOrFollowTrend>
					<!-- Which does the agent trade ageinst the trend or follow? -->
					<!-- Please image behaviors of agent. If it buy when u-mart price -->
					<!-- is down, it can be said contrarian. -->
					Against the trend
				</AgainstOrFollowTrend> 
				<Learning>
					<!-- Does the agent use learning argorithms ? -->
					No
				</Learning>
				<OnlineLearning>
					<!-- Does the agent lean on line? -->
					No
				</OnlineLearning>
			</Type>
			<OutlineOfAlgorithm>
				<!-- Please introduce feature of the agent. -->
				<!-- Note, please submit details of strategy on the attached slip. -->
				<!-- The slip should be printable pdf format. -->
				<!-- It can be written by free style with figure or flow chart according to -->
				<!-- need.  -->
				<!-- The name of the slip have to list in the following <attachment> field -->
			The agent try to obtain latest spot price and second latest spot price. If it is failed, he uses spot prices. If the latest price is higher than the second latest price, he send selling order. If the latest price is lower than the second latest price, he send buying order. Limited price of the order is given by Gaussian whose standerd deviation is given as field variable "widthOfPrice". Order volume is obtained as an uniform random numbers between minQuote and maxQuote. 
			</OutlineOfAlgorithm>
			<Program>
				<Class>
				<!-- Please introduce each class that you code. -->
				<ClassName>AntiTrendStrategy</ClassName>
				<SuperClass>
					<!-- Super Class (if it has) -->
					Strategy
				</SuperClass>
				<SummaryOfClass>
					See Summary of Agent
				</SummaryOfClass>
					<Fields>
						<Field>
							<FieldName>widthOfPrice</FieldName>
							<FieldType> int</FieldType>
							<RoleOfField>
								Variance of limit price decided 
							</RoleOfField>
							<RangeOfField>
								<!-- expected range of the member constant -->
								1 ... 1000
							</RangeOfField>
							<ValueOfField>
								<!-- adopt value for the experiment -->
								20
							</ValueOfField>
							<ReasonOfValue>
								<!-- Please write the reason why you adopt the value, -->
								<!-- or why you suppose the range. -->
							</ReasonOfValue>
						</Field>
						<Field>
							<FieldName>maxQuant</FieldName>
							<FieldType> int</FieldType>
							<RoleOfField>
								Maximam volume of one order
							</RoleOfField>
							<RangeOfField>
								<!-- expected range of the member constant -->
								(minQuant+1) ... (initial cash/300,000)
							</RangeOfField>
							<ValueOfField>
								<!-- adopt value for the experiment -->
								50
							</ValueOfField>
							<ReasonOfValue>
								<!-- Please write the reason why you adopt the value, -->
								<!-- or why you suppose the range. -->
							</ReasonOfValue>
						</Field>
						<Field>
							<FieldName>minQuant</FieldName>
							<FieldType> int</FieldType>
							<RoleOfField>
								Minimum volume of one order
							</RoleOfField>
							<RangeOfField>
								<!-- expected range of the member constant -->
								1 ... (maxQuant-1)
							</RangeOfField>
							<ValueOfField>
								<!-- adopt value for the experiment -->
								10
							</ValueOfField>
							<ReasonOfValue>
								<!-- Please write the reason why you adopt the value, -->
								<!-- or why you suppose the range. -->
							</ReasonOfValue>
						</Field>
						<Field>
							<FieldName>maxPosition</FieldName>
							<FieldType> int</FieldType>
							<RoleOfField>
								Upper bound of net position. For asset management.
							</RoleOfField>
							<RangeOfField>
								<!-- expected range of the member constant -->
								1 ... (initial cash/300,000)
							</RangeOfField>
							<ValueOfField>
								<!-- adopt value for the experiment -->
								300
							</ValueOfField>
							<ReasonOfValue>
								<!-- Please write the reason why you adopt the value, -->
								<!-- or why you suppose the range. -->
							</ReasonOfValue>
						</Field>
					</Fields>
					<Methods>
						<Method>
							<MethodName>getOrder</MethodName>
							<SummaryOfMethod>to dicide order</SummaryOfMethod>
							<ReturnedType>Order</ReturnedType>
							<MethodArguments>
								<MethodArgument>
									<MethodArgumentName>spotPrice</MethodArgumentName>
									<MethodArgumentType>int[]</MethodArgumentType>
									<RoleOfMethodArgument>Time Series of spot price</RoleOfMethodArgument>
									<RangeOfMethodArgument>
										<!-- expected range of the member constant -->
										1 ... 
									</RangeOfMethodArgument>
								</MethodArgument>
								<MethodArgument>
									<MethodArgumentName>futurePrice</MethodArgumentName>
									<MethodArgumentType>int[]</MethodArgumentType>
									<RoleOfMethodArgument>Time Series of futures price</RoleOfMethodArgument>
									<RangeOfMethodArgument>
										<!-- expected range of the member constant -->
										-1 : When trade is failure, positive value : contracted futures price
									</RangeOfMethodArgument>
								</MethodArgument>
								<MethodArgument>
									<MethodArgumentName>pos</MethodArgumentName>
									<MethodArgumentType>int</MethodArgumentType>
									<RoleOfMethodArgument>current position</RoleOfMethodArgument>
									<RangeOfMethodArgument>
										<!-- expected range of the member constant -->
										Positive is buying position. Nagative is selling position.
									</RangeOfMethodArgument>
								</MethodArgument>
								<MethodArgument>
									<MethodArgumentName>money</MethodArgumentName>
									<MethodArgumentType>long</MethodArgumentType>
									<RoleOfMethodArgument>amount of cash</RoleOfMethodArgument>
									<RangeOfMethodArgument>
										<!-- expected range of the member constant -->
										0 ... 
									</RangeOfMethodArgument>
								</MethodArgument>

								<MethodArgument>
									<MethodArgumentName>restDay</MethodArgumentName>
									<MethodArgumentType>int</MethodArgumentType>
									<RoleOfMethodArgument>
										Number of  to the closing of market
									</RoleOfMethodArgument>
									<RangeOfMethodArgument>
										<!-- expected range of the member constant -->
										0 ... 240
									</RangeOfMethodArgument>
								</MethodArgument>
							</MethodArguments>
						</Method>
					</Methods>
				</Class>
			</Program>
			<Attachment>
				<!-- In this field, please note file name 
					that all you make or modified for
					this agent. That is include source code of the agent and
					details of strategyes and so on. -->
					AntiTrendStrategy.doc, AntiTrendStrategy.java
			</Attachment>
			<Comment>
			</Comment>
		</Agent>
	</ApplicationForm>

