<?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> DayTradeStrategy </AgentName>
			<Summary>
				Basic strategy of day trading. The agent orders selling and buying simultaneously.
				Limited price of selling order is slightly higher than latest futures price. That of buying order is lower than latest futures price.
			</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-->
					2
				</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 term trader
				</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 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 -->
				Getting last future price (U-Mart price).
				Then it decide limit price for buying and selling order.
				Price on buying order is (1-R)*P. (R: Spread Ratio, P:Latest future price)
				Price on selling order is (1+R)*P.
				Order volume is obtained as an uniform random numbers between minQuote and maxQuote. 
			</OutlineOfAlgorithm>
			<Program>
				<Class>
					<!-- Please introduce each class that you code. -->
					<ClassName>DayTradeStrategy</ClassName>
					<SuperClass>
						<!-- Super Class (if it has) -->
						Strategy
					</SuperClass>
					<SummaryOfClass>
						Same as 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>
						<Field>
							<FieldName>spreadRatio</FieldName>
							<FieldType> double</FieldType>
							<RoleOfField>
								spread ratio of buying and selling orders
							</RoleOfField>
							<RangeOfField>
								<!-- expected range of the member constant -->
								0  spreadRatio  1
							</RangeOfField>
							<ValueOfField>
								<!-- adopt value for the experiment -->
								0.01
							</ValueOfField>
							<ReasonOfValue>
								<!-- Please write the reason why you adopt the value, -->
								<!-- or why you suppose the range. -->
								20 to 40 points higher or lower than future price
							</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>
						<Method>
							<MethodName>getSellOrder</MethodName>
							<SummaryOfMethod>to dicide selling 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 : When trade is failure, positive value : contracted futures price
									</RangeOfMethodArgument>
								</MethodArgument>
								<MethodArgument>
									<MethodArgumentName>futurePrice</MethodArgumentName>
									<MethodArgumentType>int[]</MethodArgumentType>
									<RoleOfMethodArgument>
										Time Series of future 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>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. -->
				DayTradeStrategy.doc, DayTradeStrategy.java
			</Attachment>
			<Comment>
			</Comment>
		</Agent>
	</ApplicationForm>

