辅导案例-CO656

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CO656 – Computational Intelligence in Business, Economics & Finance
Assignment
Optimising trading strategies with technical analysis
Deliverables: zip file with project and other files on results, summary statistics, and presentation (project can be in Java or another language of your preference; you can use BlueJ or any other IDE you like)
Duration: Week 7 – Week 12
Deadline: 23:55 on Monday Week 12 Your task is to implement a Genetic Algorithm (GA) to optimise a trading strategy based on technical indicators. You will need to first calculate the value of different trading signals and then use a GA to combine their recommendations (BUY, HOLD and SELL signals). For this assessment, you should use the Unilever.csv file, which was given to you during the practical related to EDDIE.
Part A: Implementing technical indicators and trading signals
Task 1: Indicators (10%)
Task 1a Given the Moving Average (MA) formula below, calculate the 15 days moving average. Once you are done with this, also calculate the 50 days moving average. (, ) = () − 1 ∑ ( − )/0121 ∑ ( − )/012 where t is the current price, and L is the period length (15 or 50 days).
Task 1b Calculate the 24 days trade break out rule (TBR), given the formula below. (, ) = () − max {( − 1),… , ( − )}max {( − 1),… , ( − )} where t is the current price, L is the period length (24 days), and max{…} would return the maximum price in the range of [t-1, t-L].
Task 1c Calculate the 29 days volatility (Vol), given the formula below.
(, ) = ((),… , ( − + 1)1 ∑ ( − )/012 Where is the standard deviation for the prices in the given range, t is the current price, and L is the period length (29 days).
Task 1d Calculate the 64 days momentum (Mom), give the formula below. (, ) = () − ( − )1 ∑ ( − )/012 Where t is the current price, and L is the period length (64 days).
Task 2: Trading signals (10%)
Task 2a Use the two MA indicators from above to generate buy and sell signals. For each indicator entry, you should compare MA_15 (15 days moving average) to MA_50 (50 days moving average), and generate signals in the following manner: If MA_15 > MA_50 => BUY If MA_15 < MA_50 => SELL If MA_15 = MA_50 => HOLD
Task 2b Use the TBR indicator above to generate signals in the following manner: If TBR_24 > -0.02 => SELL If TBR_24 < -0.02 => BUY If TBR_24 = -0.02 => HOLD
Task 2c Use the Vol indicator above to generate signals in the following manner: If Vol_29 > 0.02 => BUY If Vol_29 < 0.02 => SELL If Vol_29 = 0.02 => HOLD
Task 2d Use the Mom indicator above to generate signals in the following manner: If Mom_64 > 0.003 => BUY If Mom_64 < 0.003 => SELL If Mom_64 = 0.003 => HOLD
PART B: Genetic Algorithm
Task 1 (60%) Use a GA to combine the output of the trading signals from Task 2a–2d. For example, the indicator may generate the following signals: Task 2a => BUY Task 2b => BUY Task 2c => HOLD Task 2d => SELL In this case, you could choose to BUY since the majority of trading signals are recommending this action. We say that all signals have the same weight in this case. Your task is to implement a GA to evolve a set of weights (one for each trading signal) to determine an optimal trading action. Your individual representation should associate a numeric weight (between 0 and 1) to each trading signal, e.g.: 0.4 x Task 2a => BUY 0.2 x Task 2b => BUY 0.1 x Task 2c => HOLD 0.8 x Task 2d => SELL Note that the sum of the signals does not need to add up to 1. In the case above, the strategy decides to SELL, given that it is the signal associated with the highest weight: BUY = 0.4 + 0.2, HOLD = 0.1 and SELL = 0.8. Your implementation should include:
• individual representation [10%]: for correct representation, one weight value between 0 and 1 per trading signal;
• fitness function [25%]: for correct evaluation of candidate solutions. The fitness function should operate with an initial budget of £1000 and stock amount of 0. For each value on the training data, it should generate a trading signal. Every BUY action should deduct the amount from the budget and only be performed if there is sufficient budget, and increase the stock amount; every SELL action should deduct the stock amount and only be performed if there is sufficient stocks, and increase the budget accordingly; HOLD actions have no effect. The fitness of a solution is the total balance at the end of trading (budget + stock), where the stocks should be converted to cash using the last value of the training period;
• selection method [10%]: the GA should use tournament selection;
• genetic operators [10%]: the GA should use one mutation and one crossover operator of your choice. The mutation operator should only generate values between 0 and 1;
• termination criteria [5%]: a maximum number of generations should indicate the end of the evolutionary process.
At the end of the evolutionary process, the best weight configuration should be returned.
PART C: Oral presentation
Task 1 (20%) Prepare powerpoint slides to make a 5-minute presentation on your implementation and results.
The presentation will take place during the lecture slot of Week 12. Attendance is compulsory. Topics you should cover in your presentation:
• How much you managed to achieve in terms of the given tasks.
• Difficulties during your implementation: what has gone well, what has gone wrong.
• Would you do anything differently if you had to re-do this Assignment.
• Report on your experimental results, including summary statistics, e.g. average; standard deviation (If you haven’t obtained any results yet, that is fine. But you should still mention that you don’t have any results).
• Report on different GA parameters that you might have used, and how/if they affected the performance of the algorithm. If you’ve tried different parameters, you should also present statistical analysis to support your argument.
• Anything else you consider useful to mention, e.g. any additional methods implementation you decided to implement. Please also note that your talk should be well-prepared and well-structured.
Submission Electronic version (zip file) of the project, along with any results files, statistical analysis, and powerpoint slides. The zip file should be submitted via Moodle before the deadline. Any other form of submission will not be accepted. Note that the submission link will not be available after the deadline.


Plagiarism and duplication of material
• Late or non submission of coursework The penalty for late or non submission of coursework is normally that a mark of zero is awarded for the missing piece of work and the final mark for the module is calculated accordingly. • Plagiarism and Duplication of Material Senate has agreed the following definition of plagiarism: "Plagiarism is the act of repeating the ideas or discoveries of another as one's own. To copy sentences, phrases or even striking expressions without acknowledgement in a manner that may deceive the reader as to the source is plagiarism; to paraphrase in a manner that may deceive the reader is likewise plagiarism. Where such copying or close paraphrase has occurred the mere mention of the source in a bibliography will not be deemed sufficient acknowledgement; in each such instance it must be referred specifically to its source. Verbatim quotations must be directly acknowledged either in inverted commas or by indenting." The work you submit must be your own, except where its original author is clearly referenced. We reserve the right to run checks on all submitted work in an effort to identify possible plagiarism, and take disciplinary action against anyone found to have committed plagiarism. When you use other peoples' material, you must clearly indicate the source of the material using the Harvard style
(see http://www.kent.ac.uk/uelt/ai/styleguides.html). In addition, substantial amounts of verbatim or near verbatim cut-and-paste from web-based sources, course material and other resources will not be considered as evidence of your own understanding of the topics being examined. The School publishes an on-line Plagiarism and Collaboration Frequently Asked Questions (FAQ) which is available at: http://www.cs.kent.ac.uk/teaching/student/assessment/plagiarism.local Work may be submitted to Turnitin for the identification of possible plagiarism. You can find out more about Turnitin at the following page: http://www.kent.ac.uk/uelt/ai/students/usingturnitinsts.html#whatisTurnitin
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468