Professional Documents
Culture Documents
By
Mavhura Prince (R163611Q)
BSc Computer Science Honours
Phone 0784638328
Email princemavhura@gmail.com
Abstract
This research is aimed at developing an automated trading system that is to be used by shockmedia to
help them in forex trading. It allows each trader to be able to perform automated trading and allows the
traders to place and monitor trades on the platform. The system has been developed after observing
the current systems that involves a lot of work to perform trades and monitor open trades positions.C-
sharp was used in order to achieve these objectives. Objectives that had been stated were used as the
guideline to the development of the project. The system can also be improved based on the system
modules that needs to be changed and also to be in line with technological advancements.
i
Declaration
I,MAVHURA PRINCE, here declare that l am the sole author of this dissertation. I authorize Midlands
State University to lend this dissertation to other institutions or individuals for the purpose of scholarly
research.
Signature………………………………………… Date……………………………………….
ii
Approval
This dissertation entitled “Automated trading and data analysis application” by PRINCE MAVHURA
meets the regulations governing the award of the degree of BSc HONOURS COMPUTER SCIENCE of the
Midlands State University, and is approved for its contribution to knowledge and literal presentation.
Supervisor ………………………………………..
Date …………………………………………
iii
Acknowledgements
I would like to acknowledge the Computer Science and Information System Department for allowing me
to carry out this research. I would also want to thank them for their treasured support and assistance
during the period of assessment presentations of the research. I greatly thank my supervisor, Mr P
MUPFIGA for his treasured help and continuously guiding me towards achieving the system objectives.
I would also want the thank the Midlands State University (MSU) at large for providing me with this
learning environment that is comfortable and well acquitted with learning resources that helped me in
carrying me the research.
iv
Dedication
I would like to dedicate all my work to my lovey parents Mr. and Mrs. Mavhura for their support, being
my source of inspiration and also for working hard so that l could achieve my goals.
v
Table of Contents
CHAPTER ONE: INTRODUCTION ………………………………………………………………………………….................... 1
1.1 Introduction ………………………………………………………………………………………………………………. 1
1.2 Background of study ………………………………………………………………………………………………… 1
1.2.1 Background of organization ……………………………………………………………………………………. 2
1.2.2 Organizational structure ………………………………………………………………………………………… 2
1.2.3 Vision ……………………………………………………………………………………………………………………… 2
1.2.4 Mission statement …………………………………………………………………………………………………… 3
1.3 Problem definition …………………………………………………………………………………………………… 3
1.4 Aim ………………………………………………………………………………………………………………………… 3
1.5 Objectives …………………………………………………………………………………………………………………. 3
1.6 Instruments and methods ………………………………………………………………………………………… 3
1.6.1 Visual studio 2017 ………………………………………………………………………………………………… 3
1.6.2 Sql database ………………………………………………………………………………………………… 4
1.6.3 Methods ………………………………………………………………………………………………………………… 4
1.7 Justification and rationale …………………………………………………………………………………………… 4
1.8 Conclusion ……………………………………………………………………………………………………………. 4
CHAPTER 2: PLANNING PHASE ………………………………………………………………………………………………………… 5
2.1 Introduction …………………………………………………………………………………………………………………………… 5
2.2 Business value …………………………………………………………………………………………………………………………. 5
2.3.1 Business needs ……………………………………………………………………………………………………………………… 5
2.3 Feasibility Analysis ……………………………………………………………………………………………………………………. 5
2.3.1Technical feasibility ………………………………………………………………………………………………………………. 6
2.3.1.1 Technical expertise …………………………………………………………………………………………………………….. 6
2.3.2 Economic feasibility …………………………………………………………………………………………………………….. 6
2.3.2.1 Tangible benefits ……………………………………………………………………………………………………………….. 7
2.3.2.2 Intangible benefits …………………………………………………………………………………………………………….. 7
2.3.2.3 Development costs …………………………………………………………………………………………………………… 8
2.3.2.4 Operational costs ………………………………………………………………………………………………………………. 9
2.3.2.5 Return on investment (ROI) ………………………………………………………………………………………………. 11
2.3.2.6 Cost benefit analysis for a four year period ……………………………………………………………………… 12
vi
2.3.2.7 Net present value …………………………………………………………………………………………………………… 13
2.3.3 Social feasibility ………………………………………………………………………………………………………………… 14
2.3.4 Operational feasibility ……………………………………………………………………………………………………… 15
2.4 Risk analysis ………………………………………………………………………………………………………………………… 15
2.4.1 Technical risks …………………………………………………………………………………………………………………… 15
2.4.2 Economic risks ………………………………………………………………………………………………………………… 15
2.5 Development of work plan …………………………………………………………………………………………………… 15
2.5.1 Project Gantt chart ……………………………………………………………………………………………………………… 16
2.6 Conclusion ……………………………………………………………………………………………………………………………… 17
CHAPTER 3 ANALYSIS PHASE ……………………………………………………………………………………………………… 18
3.1 Introduction …………………………………………………………………………………………………………………………… 18
3.2 Information gathering methodologies ……………………………………………………………………………………… 18
3.2.1 Questionnaires ……………………………………………………………………………………………………………………… 18
3.2.1.1 Closed-ended questionnaires ……………………………………………………………………………………………… 18
3.2.1.2 Open-ended questionnaires ………………………………………………………………………………………………… 18
3.2.1.3 Advantages of questionnaires …………………………………………………………………………………………… 18
3.2.1.4 Disadvantages of questionnaires ………………………………………………………………………………………… 19
3.2.1.5 Findings from questionnaires …………………………………………………………………………………………… 19
3.2.2 Interviews …………………………………………………………………………………………………………………………….. 19
3.2.2.1 Structured interviews ……………………………………………………………………………………………………….. 19
3.2.2.2 Unstructured interviews ……………………………………………………………………………………………………. 19
3.2.2.3 Advantages of interviews …………………………………………………………………………………………………… 20
3.2.2.4 Disadvantages of interviews ……………………………………………………………………………………………… 20
3.2.2.4 Findings from interviews ………………………………………………………………………………………………….. 20
3.2.3 Observations ……………………………………………………………………………………………………………………….. 20
3.2.3.1 Advantages of observations ……………………………………………………………………………………………….. 20
3.2.3.2 Disadvantages of observations ………………………………………………………………………………………….. 21
3.2.3.3 Findings from observations ……………………………………………………………………………………………….. 21
3.3 Analysis of existing system ……………………………………………………………………………………………………….. 21
3.4 Process Analysis ……………………………………………………………………………………………………………………… 21
3.5 Data analysis …………………………………………………………………………………………………………………………… 23
3.5.1 Context diagram …………………………………………………………………………………………………………………. 23
vii
3.5.2 Dataflow diagram ………………………………………………………………………………………………………… 24
3.6 Weakness of the current system …………………………………………………………………………………… 25
3.7 Evaluation of Alternatives ………………………………………………………………………………………………… 25
3.7.1 Outsourcing ………………………………………………………………………………………………………………… 25
3.7.1.1 Advantages of outsourcing ………………………………………………………………………………………… 25
3.7.1.2Disadvantages of outsourcing ………………………………………………………………………………… 25
3.7.2 Improvement of the current system …………………………………………………………………………… 26
3.7.2.1 Advantages of improving the current system …………………………………………………………… 26
3.7.2.2 Disadvantages of improving the current system ……………………………………………………… 26
3.7.3 In-house development ………………………………………………………………………………………………… 26
3.7.3.1 Advantages of in-house development ………………………………………………………………………… 26
3.7.3.2 Disadvantages of in-house development …………………………………………………………………… 27
3.7.3.3 In house Development analysis ………………………………………………………………………………… 27
3.8 Requirements analysis ………………………………………………………………………………………………… 27
3.8.1 Functional Requirements …………………………………………………………………………………………… 27
3.8.1.1 Use case diagrams …………………………………………………………………………………………………… 28
3.8.2 Non-functional requirements ……………………………………………………………………………………… 29
3.8.2.1 Constraints …………………………………………………………………………………………………………………… 29
3.9 Conclusion ………………………………………………………………………………………………………………………… 29
CHAPTER 4: DESIGN PHASE ………………………………………………………………………………………………………… 30
4.1 Introduction ………………………………………………………………………………………………………………………… 30
4.2 System Design ……………………………………………………………………………………………………………………… 30
4.2.1 Description of the proposed system …………………………………………………………………………………… 30
4.2.2 Context diagram ………………………….…………………………………………………………………………… 30
4.2.4 Data flow diagram …………………………………………………………………………………………………………….. 32
4.3 Architectural design …………………………………………………………………………………………………………… 33
4.4 Physical design …………………………………………………………………………………………………………………… 33
4.5 Database design …………………………………………………………………………………………………………………… 34
4.5.1 Entity relationship diagram (ERD) ……………………………………………………………………………………… 35
4.5.2 System database tables ……………………………………………………………………………………………………… 36
4.5.3 Enhanced entity relationship diagram (EERD) ……………………………………………………………………… 37
4.6 Program design ………………………………………………………………………………………………………………………… 38
viii
4.6.1 Class diagram ……………………………………………………………………………………………………………………… 39
4.7Interface design ……………………………………………………………………………………………………………………… 40
4.7.1 Input design ………………………………………………………………………………………………………………………… 40
4.7.2 Output design ……………………………………………………………………………………………………………………… 40
4.8 Pseudo Code …………………………………………………………………………………………………………………………… 41
4.9 Security design ……………………………………………………………………………………………………………………… 42
4.10 Conclusion ……………………………………………………………………………………………………………………………… 42
CHAPTER 5: IMPLEMENTATION PHASE …………………………………………………………………………………………… 43
5.1 Introduction …………………………………………………………………………………………………………………………… 43
5.2 Coding …………………………………………………………………………………………………………………………………… 43
5.3 Testing …………………………………………………………………………………………………………………………………… 43
5.3.1 Unit testing ………………………………………………………………………………………………………………………… 45
5.3.1.1 Black box testing ………………………………………………………………………………………………………………… 45
5.3.1.1.1 Advantages of black box testing …………………………………………………………………………………… 45
5.3.1.1.2 disadvantages of black box testing ………………………………………………………………………………… 45
5.3.1.2 White box testing ……………………………………………………………………………………………………………… 46
5.3.1.2.1 Advantages of white box testing …………………………………………………………………………………… 46
5.3.1.2.2 Disadvantages of white box testing ……………………………………………………………………………… 46
5.3.2 Module testing …………………………………………………………………………………………………………………… 46
5.3.3 System testing ………………………………………………………………………………………………………………… 46
5.3.4 Acceptance testing …………………………………………………………………………………………………………… 47
5.3.4.1 Alpha testing ……………………………………………………………………………………………………………………... 47
5.3.4.2 Beta testing ……………………………………………………………………………………………………………………… 47
5.3.5 Test strategies …………………………………………………………………………………………………………………… 47
5.3.5.1 Validation ………………………………………………………………………………………………………………………… 47
5.3.5.2 System vs Objectives ………………………………………………………………………………………………………… 48
5.4 Installation …………………………………………………………………………………………………………………………… 50
5.4.1The software installation procedure …………………………………………………………………………………… 50
5.4.2 User training ……………………………………………………………………………………………………………………… 50
5.4.3 Operation environment ……………………………………………………………………………………………………… 51
5.4.4 Conversion …………………………………………………………………………………………………………………………… 51
5.4.5 System changeover ……………………………………………………………………………………………………………… 51
ix
5.4.5.1 Direct changeover ………………………………………………………………………………………………………… 51
5.4.5.1.1 Advantages of direct changeover …………………………………………………………………………… 51
5.4.5.1.2 Disadvantages of direct changeover …………………………………………………………………………… 51
5.4.5.2 Parallel changeover ………………………………………………………………………………………………………. 52
5.4.5.2.1 Advantages of parallel changeover ………………………………………………………………………………… 52
5.4.5.2.2 Disadvantages of parallel changeover …………………………………………………………………………… 52
5.4.5.3 Pilot changeover ……………………………………………………………………………………………………………… 52
5.4.5.3.1 Advantages of pilot changeover …………………………………………………………………………………… 52
5.4.5.3.2 Disadvantages of pilot changeover …………………………………………………………………………… 52
5.4.5.4 Phased changeover ……………………………………………………………………………………………………… 52
5.4.5.4.1 Advantages of phased changeover …………………………………………………………………………… 52
5.4.5.4.2 Disadvantages of phased changeover …………………………………………………………………………… 53
5.5 Maintenance ………………………………………………………………………………………………………………………… 53
5.5.1 System review ……………………………………………………………………………………………………………………… 53
5.5.2 Corrective maintenance ……………………………………………………………………………………………………… 53
5.5.3 Adaptive maintenance ……………………………………………………………………………………………………… 53
5.5.4 Perfective maintenance ………………………………………………………………………………………………………… 53
5.5.5 Preventative maintenance …………………………………………………………………………………………………… 54
5.5.6 Disaster recovery ………………………………………………………………………………………………………………… 54
5.5.6.1 Security …………………………………………………………………………………………………………………………… 54
5.5.6.2 System backup …………………………………………………………………………………………………………………… 54
5.5.6.2.1 Full backup …………………………………………………………………………………………………………………… 54
5.5.6.2.2 Incremental backup ……………………………………………………………………………………………………… 55
5.5.6.2.3 Differential backup ………………………………………………………………………………………………………….. 55
5.5.7 System evaluation …………………………………………………………………………………………………………………… 55
5.5.8 Constraints ……………………………………………………………………………………………………………………………… 55
5.6 Recommendations ……………………………………………………………………………………………………………………… 56
5.7 Conclusion ………………………………………………………………………………………………………………………………… 56
Bibliography …………………………………………………………………………………………………………………………………… 57
x
List of acronyms
xi
List of Tables
Table 2.8: Cost benefit analysis for a four year period …………………………………………………………… 13
xii
List of Figures
Figure 1.1 showing the organizational structure ………………………………………………………………………… 2
Figure 3.1 showing activity diagram of current system ……………………………………………………………… 22
Figure 3.2 Context diagram ………………………………………………………………………………………………………. 23
Figure 3.3 Showing Data flow diagram of the current system ……………………………………………… 24
Figure 3.4 showing use case diagram for the proposed system ………………………………………………… 28
Figure 4.1 Context diagram for the proposed system ………………………………………………………………… 31
Figure 4.2 Showing Data flow diagram of the proposed system ……………………………………………… 32
Figure 4.3 showing the architecture of the automated trading system …………………………………… 33
Figure 4.4 showing the physical design of the automated trading system ………………………………… 34
Fig 4.5 Proposed system ERD …………………………………………………………………………………………………. 35
Figure 4.6 showing the EERD ……………………………………………………………………………………………….. 37
Figure 4.7 Package diagram for the proposed system …………………………………………………………… 38
Figure 4.8 Class diagram for the proposed system ………………………………………………………………… 39
Figure 4.9 showing the main menu ………………………………………………………………………………………… 40
Figure 5.1 System testing stages ……………………………………………………………………………………… 44
Figure 5.2 Black Box test ………………………………………………………………………………………………………… 45
Figure 5.3 Showing system giving a trade signal …………………………………………………………………… 48
Figure 5.4 Showing performing automated trading ………………………………………………………………… 49
Figure 5.5 Showing the system indicating trend direction ………………………………………………………… 49
Figure 5.6 Showing performing assisted trade monitoring ……………………………………………………… 50
xiii
List of Appendices
Appendix A: User manual ……………………………………………………………………………………………………………….. lviii
Appendix B : Interview checklist …………………………………………………………………………………………………….. lxii
Appendix C : Questionnaire checklist …………………………………………………………………………………………….. lxiii
Appendix D : Observation score sheet …………………………………………………………………………………………… lxiv
Appendix E : Snippet of Code …………………………………………………………………………………………………………. lxv
xiv
CHAPTER ONE: INTRODUCTION
1.1 Introduction
Today companies want to archive efficiency in any way possible that means even employing
automated programs that perform certain functions in a corporation .The reluctance that
companies have in investing in new emerging software’s solution lead to most of them not
attaining their objectives .When most corporation view employees as entities which cause
problem they are going to trust them less with the process of decision making ,this will lead to
considerable losses in the company .With this companies are now searching for emotionless
solutions that perform as they are told and show no deviation from the original way the make
decisions. An automated trading system that make and manage trades, this system would allow
the use of algorithms to place trades and manage open positions without turning them into losing
positions. The system to be established would allow better decision making which will help
humans and remove some of the weakness humans have in decision making. The systems
objective is to improve the making of trades and management of open position.
During a visit to Shockmedia Company upon meeting the traders and observing them performing
their work, they were many problems observed which were making a company loss a lot of
trades. It was observed that most of trades were placed manual, managing open positions was
done manually ,there was no system that could perform automated trading and also it was
difficult for traders to handle huge volume of work involved .Some winning positions will
become losing positions because of the unpredictability in forex markets and the fact that around
83% of forex trades are done using automated programs that quickly enter and exit trades at fast
rate making it difficult for workers to coupe with these algorithims.At this time there was no
system that was being put in place to cope with the changing market environment which would
guarantee that shockmedia will stay in business and have an edge over other traders which would
result in huge returns. The situation helped in coming up with a conceptual system that can
benefit the workers and the company.
1
1.2.1 Background of organization
Shockmedia was launched in 2011. It was small forex trading company that is privately owned.
Being a small company there are certain limitations which it will face and the fact that it is
privately owned company. Having passing the first difficult stage the company have now
expanded to offer more services. Being one of its kind it have established a huge fan base it is
currently being used also by other companies to make a safe investment. It have over a thousand
top clients who want their funds and assets to be managed. Being a trading company shockmedia
does not only trade it manages other peoples assets. It is a consultant firm that any other firms
might seek advice on how and where to invest money in.
1.2.3 Vision
2
1.2.4 Mission statement
Shockmedia is trading forex using manual methods and long hours of monitoring open positions
which lead to workers complaining and inefficiency in this model. As the industry is mostly run
by automated programs it becomes difficult to make reasonable profits in this industry. However
a system should be produced so that it will address these problems being currently faced by
shockmedia. The proposed system will be able to monitor open trades positions, offer advice to
traders on which side of the trade to take, make automated trades when the conditions are
favorable.
1.4 Aim
The idea is to come up with a system that can make decision based on data provided from the
market and provide a platform that aid to decision made by traders. The system will be able to
learn from historical data and perform automated trading using custom algorithms specific to this
system. The system will be a c# based system where Shockmedia traders can access the system
and perform the operations such as back testing and practicing trading.
1.5 Objectives
1. To develop algorithms that perform forex data analysis for automated decision making.
2. To develop a system that perform automated trading.
3. Providing a system that assist traders by indicating trend direction and providing suggested
action to take based on market data.
4. Perform assisted trade monitoring.
3
1.6.2 Sql database.
It’s going to be the version that is used in Microsoft visual studio .The database is going to store
information of the running program.
1.6.3 Methods.
1. Observations- they are performed by closely watching people carrying out their jobs.
2. Interviews– information is gathered from employees through face to face conversations and
information required is collected.
3.Questionnaires –they contain certain questions that require answers from employees
1.7 Justification and rationale
The newly proposed system is going to improve efficiency in the organization .Its an idea that
will make Shock media have an edge in the industry. The system increases reactivity and
increases efficiency. The system offer a platform that helps traders in making decision and in
managing these decisions which is essential in the industry. The system reduces workload on
traders thus enabling them to have time to come up with new ideas thereby increases
productivity.
1.8 Conclusion
This chapter highlighted a lot of information about Shock media Company. Details about what
the company needs and the problems which the company is facing were indicated. This
introductory chapter was indicating the intent which the researcher have to develop an automated
trading sytem.The instruments and information gathering methodologies were clearly stated.
4
CHAPTER 2: PLANNING PHASE
2.1 Introduction
This chapter begins by highlighting the benefits that the current system bring to shock media .An
analysis is going to be performed that will determine is it worth to keep or develop a new system
is done based on the outcome from the analysis .Different type of analysis are performed to see
what might cause the new system not be developed and what stakeholders will think and decide
that should be developed.
This involves a lot of aspects that determine the well-being of the busisnes.Developing
the automated trading system will make the organization to be able to develop new
strategies and test them quickly, if they are success they are then implemented. This
system is going to benefit the organization in ways given below:
1. More time for traders to develop new strategies - rather than having traders spending
most of their time monitoring trades and making trades they are given time to find
new strategies and new ways to benefit from the system .
2. Less hard work is going to be performed by traders – having a system that can make
automated trades and monitor them it lessens the amount of work that is done by an
individual trader.
2.3.1 Business needs
1. The company want a system that can make automated profitable decisions.
2. A system that can easily be learnt and used in the current working environment.
3. All trade open positions to be monitored and to allow opening of many trading positions.
5
feasibility analysis there is one aim to come up with the best solution that is going to be
profitable to the company.
2.3.1Technical feasibility
This will determine whether the company have enough people with the knowledge
required to develop the system. During this study technical requirements and technical
expertise that is present at shock media is going to be compared against technical
requirements for the project to be implemented.
During research employees at shock media have enough expertise that is required , the
company have Microsoft certified c-sharp experts
computers 20 10
Printers 10 5
6
2.3.2 Economic feasibility
In this time of analysis the company try to determine if the economic benefits are more than the
cost involved in the project development. The objective is come up with system that have low
cost and saves money in the long run and compared to the cost incurred in purchasing or the
development of the system.
Are benefits which can be quantified especially in money, some are listed below.
1. Tracking of trades – This is so because the traders will sometimes leave their machines
to do other jobs. By having this system it can track and monitor trades.
2. Time for planning – As the traders will no longer spend most of their time watching
open trades they are given more time to plan and come up with new strategies.
BENEFITS
Total $ 7 500
These are benefits that are not reportable for accounting purposes but they are helpful to the
business. They are given below
1. Efficiency in decision making– the system will be helping decision maker in making
decisions.
7
2. Improved delivery of services to customers– an automated trading system will result in
the company being able to deliver many services in a way that is productive.
Intangible benefits
Total $ 3 900.00
They are cost that will be experienced while still in the process of developing a new system
1. Training how to use the system– this is done in order to make the staff familiar
with the new system.
2. New software’s – this is software that is going to purchased for use at the
company.
3. Stationary used on daily basis during the development – used during the
process of developing a new system for various processes for example printing.
4. Salaries – when external staff is hired for services they require to be paid.
8
EXPECTED COSTS TOTAL
DEVELOPMENTS
COSTS
Salaris $ 750.00
Stationery $ 750.00
Installation $ 200.00
Total $ 3 000.00
1. Maintenance of the running software – this required for a system to operate efficiently.
2. Licenses – licenses of software bought by the organization need to be licensed for it to be
used without facing consequences.
3. Hardware maintenance – the hardware wears over time due to usage therefore it need to
be fixed so it works well
4. Stationary – Required for the day to day running of the company.
5. Salaries – employees are paid for the work they perform on monthly basis.
9
EXPECTED COSTS TOTAL
OPERATIONAL COSTS
Salaries $ 1 150.00
Total $ 4 950.00
10
EXPECTED SUMMARISED TOTALS TOTALS
From the table above it is shown that net profit over weighs the cost, so the project is
economically feasible
The return on investment is the value that will indicate by how much percentage the project will
bring to the company on a specific period of time.
11
ROI = (Total Benefits - Total Costs) * 100 %
Total Costs
8000
(8000)
ROI = 40 %
Because the return on investment is 40% this indicate that the project is economically feasible.
The table on the next page shows the approximated four year cost benefit table. These values are
summarized.
12
ANNUALLY EXPECTED Year 1 Year 2 Year 3 Year 4
Sehlhorst, (2006) defines Net present value, or NPV as the great equalizer of monetary study.
13
The initial investment is 20 149
(1.08) 1
= $ 2 732
(1.08)2
= $ 7 073
(1.08)3
= $ 5 434
(1.08)4
= $ 8 379
= $ 23 618 - $ 20 149
From the above calculations the NPV value is positive indicating that the profits generated from
the project are going to be greater than the costs.
1. With the implementation of the new system less cost are going to be incurred this results in
extra funds being available that are going to be used for social activities.
14
2. Improved communication among the members of the company due to less time spend
being busy so they will be time for communication among team members.
The system being proposed have negative effects, some workers are going to loose their jobs
as the automated system will do some of the work that was done by many employees. In
conclusion the system is socially feasible because they are many benefits it brings to the
environment than to individual entities .This results in it being socially feasible.
1. Shortage of finance to complete the project. The solution is to obtain most of the
resources needed for the project at the beginning.
1. System analysis
2. System design
15
3. Coding
4. Testing
5. Implementation
6. Maintenance
The table below shows plan that is going to be followed during the development of the trading system.
A Gantt chart provides information about the work that is going to be performed and the time
which it should be completed.
16
WEEK 1 2 3 4 5 6 7 8 9 10
Project Proposal
Introduction
Planning
Analysis
Design
Implementation
Maintenance
Documentation
2.6 Conclusion
In this chapter feasibility analysis were carried out to have a clear picture whether the system is
feasible. In the end it was concluded that the project is feasible. Work plan of the project have
been developed at the end of this chapter. Many factors were highlighted in this chapter that
will help in the project being successfully carried out.
17
CHAPTER 3 ANALYSIS PHASE
3.1 Introduction
In this phase analysis is going to be done at shock media by looking at various aspects of the
system being used. The analysis is going to be performed by looking at activity diagrams,
dataflow diagrams of the current system.
These are methods that are going to be used to gather information about the system to be
developed. Different methods are going to be used to gather information needed for the proper
development of the system.
3.2.1 Questionnaires
Questionnaires are a set of questions used to acquire information about the subject at hand.
These questions were prepared to gather information of what the traders and the managers
wanted to be incorporated into the new system. After information have been gathered through
the use of questionnaires ,the system did not support automated trading ,monitoring of trades and
also help in decision making.
They are questions which you have to answer from selecting from a limited number of options.
These are mainly written down after a proper research have been done ,this makes them difficult
to use. When answering such questions a skill is needed.
They require no research to be firstly done at the company. This makes them being preferred by
most people to do a research about a system that need to be developed.
18
3. They have no details about the person who have answered them therefore they are
anonymous.
1. If questions not understood the person answering can give wrong information.
2. When the size is small the information collected is difficult to analyze and come up with
a correct result.
3. Closed ended questions are restrictive of the information gathered there-fore information
gathered deepens on the questions presented.
Most of the employees were responsive to the questionnaires his makes them have enough
information valuable to use .A lot of information gathered from questionnaires have a high
chance of being correct.
3.2.2 Interviews
Is a method of data gathering that involves asking a questions to individuals or many people to
gain information to use or for work interview. They were done at shock media to obtain
information about the current system and the one to be developed. Selected individuals at Shock
media were interviewed, these employees were mainly traders and their managers in order to get
a clear picture of what is needed to be in cooperated into the new system. These interviews
provided a clear picture how the current system works.
In this technique question are structured and participants are asked these same questions which
are weighed. They require short answers and are not used for non-sensitive questions.
They do not have answers which means they allow as much information as possible to be
collected (Modell, 2007). They allow sensitive subject area to be asked which will make them
19
suitable to obtain adequate information. This was used by the researcher to carry out most of the
research.
1. They allow much more information to be obtained and the views of person being
interviewed also.
2. There is freedom to ask a lot of questions which lead to collection of much information
being collected.
1. It takes a lot of time to prepare the interview questions and in conducting the actual
process of interviewing people.
From the targeted population interviewed. It was needed long hours sitting in front of desktop
watching the market data and also monitoring trades. There was no system that was able to help
traders with their work, the company relied on certain individuals alone to make decision that
might risk the existence of the company.
3.2.3 Observations
Observation is the collection of information by the researcher observing real people doing their
work (Powell and Steele, 1996).It was observed that due to unexpected changes in the market
movement the traders team would not attend all the trades they have made. A visit to shock
media allowed information to be collected in real time and observing how the current system
really works.
20
2. It allow the validation of the information that have been gathered using other
methodologies.
2. When you are observing the employees they tend to deviate from how they actually use
the system leading to obtaining of wrong information.
Traders sometime could not attend to the calls from the administrator. This led to the
administrator not talking to the traders during busy hours due to the overwhelming data they will
be working with. Also that traders will not leave open positions overnight because of fear of the
unknown market movement that might occur. Only a small number of trades were performed
because of the difficult in monitoring many trades.
The existing system is scrutinized to see how it functions at the shockmedia company. This
existing system is used by 10 traders .Each have his/her workstation connected to the real forex
market.
The process of making trades and managing trades at shockmedia is like this. First a
trader have to identify potential trend in the forex market pair .When that is done a
budget is set. Then he enter a position long or short .Lastly the trader have to monitor the
open positions on the computer screen to close trades if certain conditions are met. This
system have a weakness that the trader is now glued to the screen he cannot perform
other work, finding other opportunities in other currencies. This put much stress on
traders leading them to make unnecessary wrong trades.
21
Choice
Expert Normal
Market watch Mode? Fundamental analysis
Technical analysis
Analysis result
Alarm
22
3.5 Data analysis
Berthold & Land (2007) agree that, data analysis is carefully taken into consideration
and is a well calculated process of decision making on deciding the most useful and
important data that has to be taken note of. In simpler terms, this is an activity that
includes the modelling, inspection and transformation of data in order to successfully
select the data or information that is useful and meaningful so that conclusions can be
drawn from it and decision making can smoothly happen
Enhancement requirements
0
0
Trading system
Places trades
Key:
Entity Dataflow process
23
3.5.2 Dataflow diagram
Shows the system most important features using symbols. Below is the illustration of the
processes in making trades.
Manager
2
Update account Deposit cash
Deposit cash
D account
3 withdrawn amount
Update account details Withdraw cash
Orders
Transaction details
Trader
Order details
Transaction details
Third party stock center
24
Key:
3.7.1 Outsourcing
Shelly et al (2010) agree that, this is where by a company purchases software from an external
entity. Depending on the software required the company which provides the software will either
start from scratch or develop from the existing template. The company might want to just buy
already made software that perform similar task to the problems they want to address.
3.7.1.2Disadvantages of outsourcing
1. Some software’s require regular licensing and regular payment to get updates which results in
the organization being fully dependent on another organization for it to fully function.
2.Since it is a generic software it does not contain all the solutions required by the organization.
25
3.7.2 Improvement of the current system
Is the process of incorporating new required features into the existing software. This
current trading system is now becoming thing of the past because many companies are
now employing algorithms to do trading. The current system does not give an edge over
other trader resulting in loss of many opportunities. And also it have become difficult to
upgrade the system to cope with the more demand for data analysis
1. Money is spend on only the features needed to be present in the current system.
2. Improving the current system is much quicker and also mainly the functionality is the only
thing that will mostly be changed this results in the system not have to be learned again by
its users.
1. There is a limit to what can be improved and sometimes the manufacture of that software
might no longer update it.
2. Difficult to have specific functionality being incorporated because most software are generic.
2. After the project have been finished there are no extra cost like licensing.
26
3.7.3.2 Disadvantages of in-house development
1. Most of the worker are diverted from their daily work leading to other work not being done
in time.
2. The is no clear of the budget that will be needed to finish the project which might strain the
resources of the company.
During the study that was carried out in-house development was found to have a great
percentage of return on investment .In conclusion in-house development is favorable
because of easy in maintaining the system, easy to upgrade and that there are no
difficulties that will be faced when new features are to be incorporated that are specific
to this organization.
This is done to identify the requirements that are needed to be present in the new system.
These are tasks that a system must do and the process a system must perform to be
considered by stakeholders (Robertson and Robertson, 2012).
1. Perform forex market data analysis to assist traders with trend direction.
2. Assists with the monitoring of open positions.
3. Allow or disallow trader from opening positions in certain market conditions that a likely to
result in losses.
4. The system should allow automated trading
27
3.8.1.1 Use case diagram
Shows the interaction between users and the system
Market watch
Trade
monitoring
Place trade
Trader
Data analysis
Financial reports
Manager
Figure 3.4 showing use case diagram for the proposed system
28
3.8.2 Non-functional requirements
These are additional functions to the system that are added so as to improve the
functionality (Robertson and Robertson, 2012).
1. User friendly interface – The interface should be similar to the one that have been used.
2. Down-time of the system due to errors should be less –in any system there are certain
errors that occur that might have been caused by users so in that case the system should
be able to recover from such errors.
3. Perform multiple functions at the same time –the system should be able to perform tasks in
parallel so that the user interface will remain responsive.
3.8.2.1 Constraints
1. Finance –When carrying out a software project it is difficult to come up with the actual
amount of money needed to finish the project.
2. Time for the project to complete – Because the project like this have not been carried out it is
difficult to come up with an accurate estimate for the time, it might be less or more.
3. Strain on resources – At a company they are various projects that will be carried out, so the
resources needed might not be present at a given moment in time.
3.9 Conclusion
In this chapter the current system at shockmedia have been evaluated and all the
alternatives. This led to the conclusion that a new system is going to be developed in-
house. With this information at hand we now proceed to the next chapter .
29
CHAPTER 4: DESIGN PHASE
4.1 Introduction
This section is going to outline many aspects about the design of the proposed system.
All different aspects are going to be looked closely so that the system will be easily
implemented. The look of the user interface is going to be shown which is going to be
user friendly.
Is the process of defining components that are going to be in the system being
developed. The system is going to assist traders with the forex market analysis providing
with trend direction and the type of trade they should perform. Due to changes in the
market forex trading is now being performed by automated trading system so
incorporating this feature will be useful .The system is going to assist traders by
monitoring trades for them so that they can perform other work without being glued to
the screen.
1. The system should have high reliability meaning if an error occurs the system should
be able to recover is less time. This reliability should be much more than that of the
current system at shockmedia.
2. The system should require less maintenance and also it should be easily maintained.
In forex the markets are always evolving on daily basis new features might be
needed to be incorporated they should take less time so that the company will not
miss many opportunities during the down time.
3. Efficiency in the user interface the user interface should not have many unnecessary
menus.
Shows the flow of information between system and external entities. The software is
shown as a single process.
30
Management
Reports
Enhancemence requirements
Algorithms
Places trades
0
Trading system Traders
Operational standards
Trade reports
31
4.2.4 Data flow diagram.
1
Transaction history Check transaction Transaction History
Manager
2
Deposit cash Deposit cash
Update account details
3
D account Withdraw cash withdrawn amount
Order details
Automated algorithms
Third party stock center Transaction details
32
Key: Process Flow of data Data store entity
33
Figure 4.4 showing the physical design of the automated trading system
is the organization of data according to a database model. The designer determine how
information is going to be stored and the way it is linked. This is done to optimize the
database.
34
4.5.2.1 Entity relationship diagram (ERD)
surname
Updates
Trader records Administrator
places
name surname
Views Trades
Manager reports
username
Type date
size
Entity
Attribute
Dataflow
Relationship
35
4.5.2 System database tables
36
4.5.3 Enhanced entity relationship diagram (EERD)
Surname
name
employees
Salary
Snn
Traderid
Works on
Places Manages
Size Purpose
type
date
Places
State
Has Start_date
Algorithms
37
4.6 Program design
It is mainly concerned with the structure and packaged units in the software development.
Key
System modules
38
4.6.2 Class diagram
A class diagram is a drawing that illustrates the relationship and source code that depend
on other classes in what is called the unified modelling language (Dennis, Wixom, Roth,
2012).
Trader
Profit/loss
Id:int
Date:date
Trade
+places()
Type:vachar(10) Amount:double
+closes()
Size:int(10) +generatereport()
+monitors()
Date:date
+view Transaction
+calc profit() report()
Automated trader
+calc commission()
Id :int(9) +totalamount()
+places()
+closes()
+monitors()
Manager
Id:int(9)
+Viewsreports()
+Withdrawcash()
+Depositcash()
39
4.7Interface design
The Automated trading system have interface that allows users to interact with it. Below is the
interface proposed for the system from the system.
Trading platform
Sell buy
Close trade
Automated trade
Trades monitored
start stop
Trade monitoring
Take profit
Stop loss
On this platform there are fields in which a trader is allowed to enter values and buttons to
trigger certain activities when pressed.
On the main menu there is an area where data is visualized inform of a graph.
Automated trades history is shown in a listview that shows the details of both open and closed
position when automated trading is enabled.
40
Manual and trades being automatically monitored are shown on a list view showing open and
closed trades.
Else
Display wrong password
41
4.9 Security design
According to Stair & Reynolds (2012), security design is the approach to make software free
from vulnarabilities.This process is continuous as the industry evolve new security measures
need to be put in place to prevent software’s from being damaged. Security is implemented from
the time a program is developed all the way until it have been installed.
4.10 Conclusion
During this chapter all the features and process that are going to be followed were stated.
Diagrams clearly showed the design of the proposed system. Processes that are going to be
involved during the development of the proposed system were illustrated. This marks the end of
design phase.
42
CHAPTER 5: IMPLEMENTATION PHASE
5.1 Introduction
In this chapter the system is going to be implemented and all the activities that are going to be
carried out during this phase will be discussed. This chapter is going to mark the end of the
project and in detail the recommendations are going to be given at the end of this phase.
5.2 Coding
According to Ling & Xing (2004), coding is the processes of converting the system’s design
into executable statements. This involve writing in a certain way in a development tool which
will translate this writing into functions that perform certain activities when the code is
running.
5.3 Testing
It is used to analyze the performance and to evaluate the newly installed features of the
system (Rani, 2004). This was carried out to find out if the new system was performing
as it was programmed to do.
43
Unit Testing
Module Testing
Subsystem
testing
System testing
Acceptance
testing
44
5.3.1 Unit testing
This is testing where units of code are tested (Williams, 2006). The units that will be
tested in this type of testing are usually small. Unit testing can be done in two way given
below:
It is carried out blindly without know how of code behind . The test is performed by
giving an input to the system and see what is the out .It is a success if the output will be
as expected from a given input. Below is the illustration of this type of unit testing:
1. Anyone can perform this kind of testing since there is no access to the actual code that is
required.
2. In many system it not sufficient because the tester does not have knowledge of the code so at
times the output might be wrong.
45
5.3.1.2 White box testing
This is usually performed by the person who have actually have written the code because he
is the one who understand the logic in the code. This method was used intensively during the
development of the automated system for shock media because it results in less errors and
bugs being found after the project have been finished.
1. It saves resources because the person who is coding is also testing therefore no extra people
to test required.
2. This results in efficient code being produced since the coder in the process of testing he
might discover other efficient ways to perform that same functionality.
It checks the whole functionality of the software(Linz, 2014). The system was tested
using real data so that they check if the system is performing automated trading and all
the functionality it is supposed to perform.
46
5.3.4 Acceptance testing
Acceptance testing done to see if the system is really performing as it is intended in the
objectives that have been set (Powers, 2012). The system was tested using real data to
see if it can perform the objectives that have been stated during the starting phase of the
project. Traders and the managers where given a chance to test the automated trading
system. The acceptance testing was done in the ways given below:
In this type of testing the system is presented to users who check the functionality of the
system in real time so that any errors or bugs are rectified before the system have been
deployed into the actual working environment. Areas in the system that needed to be
corrected where fixed and perfected so that no more errors could be found when the
system have been deployed in the actual working environment.
This requires experience in the software’s product being tested. Data that have known
outcomes that are used to see if the system can really perform as expected with this type
of data. If it does not perform as expected the system is again reviewed in order to
correct the functionality. The process of beta testing is done until the system is
performing as expected by the team which is testing it.
They are a number of ways in which to test the system so that you will come up with a good
system that can perform in a good way. During this process if they are any errors they are
fixed and the testers continue to test the system until they are satisfied.
5.3.5.1 Validation
The functionality of the system was validated against the objectives that have been defined
during the initial phases of the project being initiated .During validation input fields where
validated to see if they cannot allow wrong information to be used in the system. Notification
where also generated when something that is not expected by the system occur or have been the
input to the system.
47
5.3.5.2 System vs. objectives
1 To develop algorithms that perform forex data analysis for automated decision making
Figure 5.3 showing system giving a trade signal (colour in lime green)
2 To develop a system that perform automated trading.
48
Figure 5.4 Showing performing automated trading
3 Providing a system that assist traders by indicating trend direction and providing suggested
action to take based on market data.
49
4 Perform assisted trade monitoring.
From this we can conclude that a correct system have been built that meet all the objectives that have
been set.
5.4 Installation
This is when a system that have been developed will be made available for use to users on their
workstations. They are a lot of issues that are going to be looked at during this process of
installation.
1. Insert a disk that contain the software into the machine you want to install the software.
2. A wizard is going to appear with the instruction for the installation.
3. Follow all the instruction and select the required components that will function with the
software.
4. If all goes well the software will be installed.
5.4.2 User training
This is done in order to educate the users of the new system that have been developed .A training
program have been developed that will be used in the training of the users of the system. The
programs was organized in such a way that only a few employees were trained at a given time so
that other work they were performing was not completely stopped .Demonstrations were the
50
main part of the program in which the system administrator would demonstrate to the users of
the system how the system will be used. Those who did not understand were given a chance to
ask questions and answered right away .This training was conducted for a specified period of
time so that when the users of the system were to use it in a working environment they would not
make many unnecessary mistakes.
5.4.4 Conversion
This type of software use real time data and the standard application programming
interfaces are used which means there is no conversion of file systems and data. Only
the historical data is the only part from the old system that is going to be transferred.
51
5.4.5.2 Parallel changeover
In this changeover method both systems will be running in parallel for a specified period
of time. During this process both the systems works in parallel until when the
administrators of the system are satisfied.
52
5.4.5.4.2 Disadvantages of phased changeover
1. A Lot of work is done in order for the module to be in-cooperated into the old system.
2. Expensive process because of the required resources and time to perform this type of
changeover.
After evaluation of these changeover strategies direct changeover have been chosen
because the two system have been developed by different teams. The new system had
features which were beneficial and have the potential to make the company have an edge
over other traders.
5.5 Maintenance
Maintenance is the process of updating the system and fixing any issues with the system
so that it can perform at its maximum. There are a lot of types of maintenance each is
suitable for a particular situation.
53
5.5.5 Preventative maintenance
This is the maintenance of the system that aims to prevent it from degrading with the
goal of increasing the usefulness of the system throughout its use (Edwards and
Bramante, 2009).This type of maintenance might involve hiring external entities that
work closely with shock media to prevent the system from degrading to a level that will
result in the software being obsolete.
5.5.6.1 Security
A system security is the access control mechanism to a computer or a system that is
contained in the system that is available (Dorian, Heiberger and Karsten, 2003).System
security prevents most of disasters caused by unauthorized individuals. Certain security
policies are put in place to prevent such disasters.
1. User checking –the system should be in a position to check its current user credentials.
2. Secure environment –the system should be in an environment which only authorized
individuals are the only ones accessing the system.
54
quickly. The disadvantage is that it requires the system to not update its database during
the process of backing up.
From this it can be concluded that differential backup is recommended for the system because
it can be performed while the system is running.
5.5.8 Constraints
1. Finance for the project – finance for developing a project that have not been done
before is very difficult to set the actual budget that is needed. Because of this the
project might face shortage of finance and competition from other projects that will
be carried at the same time
2. Employee resistance – During the development of the project employees who felt
that their jobs will be taken were reluctant to share their knowledge. With this the
project have faced many issues that led to the project not being implemented in an
easy way.
3. Project completion time –Software project that are bespoke are difficult to carry out
because there is no already made template everything is new. The set time for project
might led to the project not have enough quality and reliability.
55
5.6 Recommendations
The system was tested and it passed all the tests that were carried out .All problematic parts
of the system were fixed so that the system will be of good quality.
1. Database of the system need to be backed up, in the event that the system have failed
it is easy to recover.
2. Employees need to be trained properly before they use the new system so that in the
future there are no issues that will be caused by employees not having enough
knowledge to properly use the system.
3. Well trained team should be available to maintain the system and fix any issues that
might arise from the running system.
4. During the system use if they are any issues that arise the proper team should be
contacted to maintain the system.
5.7 Conclusion
The main aim of this chapter was the implementation of this project. The project
objectives have been met and the system is running properly. That makes this project a
success and this project will make the company to be able to gain an advantage in
trading .
56
Bibliography
1. Agarwal, B.B. et al (2010) Software Engineering and Testing, Jones & Bartlett Publishers, LLC:USA
2. Ambler .S.W, (2004), The Object Premier: Agile Model-driven Development with UML 2.0,
Cambridge University Press, and United Kingdom.
3. Biafore .B and Stover .T, (2012), your project management coach: Best practices for managing
projects in the real world, John Wiley and sons, United States.
4. Culley .S, Mileham .A, McIntosh .R, Owen .G, (2001), Improving changeover performance,
Butterworth-Heinemann, United Kingdom.
5. Dennis .A, Wixom .B.H, Roth .R.M, (2012), System Analysis and design, John Wiley and Sons,
United States of America.
6. Dorian .C, Heiberger .E.L, Karsten .K, (2003), the backup book: Disaster Recovery from Desktop
to Data Center, Worcestershire, United Kingdom.
7. Duncan .W.R., (1996), A Guide to the Project Management Body of Knowledge, Project
Management Institute, United States.
8. Grady .O.J, (1997), System validation and verification, CRC press, United States.
9. Jordan .E, (2011), Process modelling: Context Diagrams and Data Flow Diagrams (DFDs),
McCombs School of business, United Kingdom.
10. Limeback .R, (2008), Simply SQL, Site Point, Australia.
11. Linz .T, (2014), testing in Scrum: A Guide for Software Quality, Rocky Nook, United States.
12. Modell .M.E, (2007), a professional’s guide to systems analysis, McGraw-Hill, United States of
America.
13. Myers .G.J, (2004), The Art of Software Testing, John Wiley and Sons, United States.
14. Podeswa .H, (2008), The Business Analysts Handbook, Course Technology PTR, United States of
America.
15. Powers .S, (2012), Learning Node, O’Reilly Media, Inc., United States.
16. Rani .J.S, (2004), Educational measurement and evaluation, Discovery publishing house, United
Kingdom.
17. Robertson .S and Robertson .J, (2012), Mastering the requirements process: Getting
requirements right, Addison-Wesley, United States.
18. Shelly, G. & Rosenblatt, H.J. (2011) Systems Analysis and Design. 8th Ed: Video
Enhanced, Cengage Learning, Inc.: Boston
57
Appendix A: User manual
The circled part on the picture is showing how to use signals generated from the system and it
indicates the trend direction and action to take.
lviii
The circled area is a feedback area that display the information about trades that have been
taken automatically and the profits from the trades.
The praph circled in white displays the information that is being analysed.
lix
Area marked in white is where the trader set parameters for assisted trade monitoring and they
are displayed in the listview showing trades monitored.
lx
The combobox circled in white show how to select parameters for assisted trade monitoring
when enabled by the radio button
lxi
Appendix B : Interview checklist
QUESTIONNAIRE CHECKLIST
Gender Male :
Female:
(Please tick where appropriate above)
1. How the current system is performing as compared to other systems from other companies?
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
2. Are you satisfied with the current trading system? Yes/No. If No state the reason
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
3. What major enhancements would you like to the current system?
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
7. Do you think the automated trading system will help in solving problems being faced by shockmedia?
lxii
Appendix C : Questionnaire checklist
1. Are you satisfied with the current trading system?
5. Do you have any computer back ground and how much do you know?
lxiii
Appendix D : Observation score sheet
Department: …………………………………………..
lxiv
Appendix E : Snippet of Code
}
}
if (lookhi==1 )
{
int k = lows.IndexOf(lows[lows.Count - 1]);
for (int i = k; i < passeddata; i++)
{
if ((realtime[i]-realtime[passeddata])>0.0050)
{
highs.Add(realtime[i]);
lookhi = 0;
looklo = 1;
sellcolor = 1;
buycolor = 0;
}
}
}
public void low()
{
if (lows.Count == 0)
{
if ((realtime[passeddata - 1] - realtime[passeddata] < 0.0000))
{
lows.Add(realtime[passeddata - 1]);
lookhi = 1;
lxv
}
}
if (looklo == 1)
{
int k = highs.IndexOf(highs[highs.Count - 1]);
for (int i = k; i < passeddata; i++)
{
if ((realtime[i] - realtime[passeddata]) < -0.0040)
{
lows.Add(realtime[i]);
lookhi = 1;
looklo = 0;
sellcolor = 0;
buycolor = 1;
}
}
}
public void trenddirection1()
{
if (sellcolor==1)
{
button14.BackColor = Color.Lime;
button10.BackColor = Color.Red;
}
}
public void trenddirection2()
{
if (buycolor==1)
{
button10.BackColor = Color.Lime;
button14.BackColor = Color.Blue;
}
}
public void automatedsell()
{
if (sellcolor==1 && anothertrade==0)
{
lxvi
//add items to ListView
arr[0] = "Sell";
arr[1] = realtime[passeddata].ToString();
arr[2] = "Open";
arr[3] = "-----";
itm = new ListViewItem(arr);
listView1.Items.Add(itm);
automatedtrades.Add(realtime[passeddata]);
autotype.Add("Sell");
anothertrade = 1;
}
}
lxvii