2. Company’s Profile
uTrade™ Solutions is a financial trading
technology company with various products
including multi-asset trading platform,
algorithms and analytics.
3. It’s a Startup !!
It is a startup launched in
June 2011 by alumni of
PEC University of
Technology.
Currently the strength of
organization is about 40
employees.
4. PRODUCTS
uTrade Solution provides three different kind
of products to their customers :-
• uTrade (Retail Trading Software)
• µTrade (Algorithmic Trading Software)
• Money uTrade (Portfolio management)
5. It is a multi asset trading platform offering a web
based, application based and mobile based
trading front end for various Indian and Global
markets.
6. muTrade is the quantitative trading platform
with various arbitrage, market making,
execution and other automated algorithms.
7. money uTrade is the portfolio analytics platform of
uTrade that enables users to seek various relevant
smart-information on financial securities, analyze &
optimize various financial portfolios.
15. Do I have to personally go to
exchange?
Yes if you were in 1980’s
16. How do I buy Stock Today?
Computer or Phone
I am more faster
than youI know that
17. Who is a Broker?
Man who connects you with exchange.
18. Why we need broker to trade?
Exchange only allows its members to trade who
are brokers.
19. How do I know what is the price of
particular stock?
Market Watch
20. Who will provide me Market Watch?
The person whom you are paying.
Your Broker
21. How to look at market watch?
Two points to remember:-
• Buyer is a bidder who bids for a share.
• Seller is a asker who asks for money to sell his
share.
26. What are Futures?
• Suppose the price of reliance share today is Rs
840.
• Now a trader thinks that price will rise to Rs
900 by the end of August.
27. What can he do?
Simple
• He buys one reliance share and sells it at the
end of month to earn the profit of Rs 60.
28. What if he don’t have enough money?
Do not worry he can still trade using future !!!
29. Buying a Future
• When you buy a future of a stock you have to
only give certain percentage of value of stock
to your broker.
• Suppose your broker is humble and he only
charges you 10%.
• So you can buy a future at Rs. 84 and earn a
profit of rupees 60.
30. Isn’t that cool?
By paying only Rs 84 you earned Rs 60.
So the moral of story is always buy Future
instead of stock or equity.
31. But wait there is one Bad News?
Large profit percentage comes at large risk.
32. What’s the trick?
• You can only trade future in multiples of
certain lot size.
• Suppose lot size of a future of reliance is 250.
• So you can buy 250/500/750…… futures.
33. Then what’s the benefit in trading
futures?
• Suppose price of share of Tata steel is Rs 100.
• I want to buy 250 shares of Tata steel.
• If I want to trade in equity I have to invest
100x250 = Rs 25000.
• But if I buy futures at 10% then I have to
invest 10x250 = Rs 2500.
34. Motto is simple !!
But large quantity at wholesale price.
And earn large profit percentage.
36. Lets Take the same example!
• Suppose price of one share of uTrade
(whenever it will be listed) is Rs 100.
• A man expects that it will rise to Rs 120 after
one month.
37. What option does he have now?
• What he can do is, buy an option of uTrade Solutions.
• It means that he promises to seller that he will buy
share of uTrade after one month for rupees 100.
38. What happens after one month?
• Suppose price of share of uTrade rises to
expected Rs 120.
• The Buyer of option will fulfill the promise and
earn profit.
39. What if market falls?
• Suppose price of share of uTrade drops to Rs.
80.
Break the promise to prevent loss
40. Isn’t that cool?
• First you promise to buy that share then if the
price does not rise as expected by you, then
simply break the promise.
41. Waiting for Bad News?
• Here it is……..
Their was a cost of promise you made before
one month to seller.
42. What was the cost?
• Suppose you have bought one option of Tata
Steel.
• You have to pay Rs 5 to the seller.
• If you break your promise after one month
then you will lose these 5 rupees.
44. Let me Explain!
• Consider the same scenario in which you
predicted that price of uTrade share will rise
to Rs 120 from the current price of Rs. 100.
• If you buy that share then you have to spend
Rs 100.
• If you buy option then you have to spend only
Rs 5.
45. Now the ghost arrives!!
Price of uTrade’s share falls to Rs 0.
BANKRUPTCY
46. If you have purchased share?
• You will encounter loss of Rs 100 – Rs 0 = Rs
100.
47. What if you have purchased an
option?
• You simply break the promise of buying that
share for Rs 100.
• You will only lose Rs 5 which is far less than
the loss of Rs 100.
48. Now as usual !!!!
• Options are also traded in lots like Futures.
• Like 250/500/750 and so on…. Thus increasing the risk.
54. Technologies Used
Three technologies were used to make this
application:-
• Winsock (C++) programming based on UDP
protocol to establish communication for
receiving packets.
• Visual C# (C sharp) to operate excel via
programming.
• Sqlite3 as a database management tool.
55. 2. Scripts to Automatically update
databases and generate files
OBJECTIVE:-
To automatically update all the databases at the
end of trading day and to generate appropriate
files which are used in next trading day.
56. PURPOSE
To reduce manual burden and to analyze the
performance of algorithms running in live
market.
57. Subtasks Involved
• To update our database with new companies
added or old companies removed by exchange.
• To remove all those contracts which have not
been traded by anyone in the previous trading
session in order to reduce load and increase
speed.
• To update our database with latest prices of all
the contracts in order to avoid any wrong order
from our client.
58. Technologies Used
• Bash script in Linux.
• Python for automatic downloading of files
from exchange’s website.
• PostgreSQL as a database management
language.
• C++ (SOCI Library) to extract appropriate
information from files and update that in our
database.
59. 3. MIS Report Generation
Management Information System
60. OBJECTIVE
• To generate a report at the end of trading
session which includes all the fields such as
profit/loss, turnover, quantity traded etc
corresponding to the strategies or algorithms
launched by the user on different exchanges.
61. PURPOSE
• The main purpose is to analyze the
performance of different strategies running in
live market.
• To maintain a record of executed strategies by
a particular client of broker.
62. Design
• After the strategy is terminated it produces
some strategy logs indicating the behavior of
that particular strategy.
• Using these strategy logs we can find out the
profit/loss , volume traded, turnover etc for all
the strategies and finally sum them up to find
overall profit/loss.
63. 4. Design and Implementation of Stock
Trading Algorithms
64. What is Algorithmic Trading?
It is a trading method in which a computer
trades for you.
65. Advantages
• It is very fast so that you do not even miss a
single opportunity of earning in live market.
• Eliminates the manual burden of keeping
watch on the live market, just launch the
strategy and forget.
• Very useful for analysis of news and other
events happening in the market.
66. Disadvantages
• Very expensive form of trading, usually out of
reach of common man as huge amount of
commissions are involved.
• As high speed trading is involved anything
wrong can happen. E.g. Due to fault in
algorithm it can go into infinite loop and will
continuously buy the stocks until trader’s limit
will breach.
67. Requirements
• Ultra high speed market
feed which is provided by
exchange.
• Low latency order
execution infrastructure.
68. Different Types of Algorithms
• News Based Trading
• Market Making
• Statistical Arbitrage
• Pair Trading
• Other low latency Strategies like TWAP, VWAP
etc.
70. Same in the case of Stock Market
• Suppose the same company such as Reliance
is listed on both exchanges NSE as well as BSE.
• Now let the price of share of Reliance rises up
in NSE, so it should also rise in BSE.
• But it takes certain fraction of second for this
updated price to show up in BSE.
71. In the meantime……
• We buy one share of Reliance from BSE as it is
cheap there and immediately sells it in NSE.
Buy from BSE Sell in NSE
72. Requirements for Arbitrage
Their should be two different instruments
such that price of one instrument follows the
price of other instrument.
73. Different Arbitrage Strategies
• 2 Leg Arbitrage Strategy
• Conversion – Reversal Strategy
• 2 Leg/ 3 Leg Ratio Spread Strategy
• Box Spread Strategy
• Four Leg Butterfly Strategy
74. 2 Leg Arbitrage Strategy
• Basic principle is same as that explained
above.
• There are two instruments such that price of
one follows price of other.
• We will take advantage of arbitrage between
two instruments trading on same exchange.
75. What are these instruments?
• In order to follow prices of each other their
must be something common in between these
instruments.
• First instrument is stock/equity itself.
• Second instrument is derivative of first
instrument i.e. Future.
78. How can we take Advantage of this
Fluctuation?
• Simple buy the instrument which is cheap i.e.
RELIANCE Equity worth Rs. 98.
• And Sell the instrument which is costly i.e.
RELIANCE Future worth Rs. 109.
• So the net credit is 109 – 98 = Rs. 11.
• But your position is not closed.
• Closed position means that you should not
have anything with you.
79. Now wait for sometime……..
Till price difference again reaches to constant
of Rs. 10
80. When price Difference reaches Rs. 10
• Simple reverse your previous trades to close
your position in market.
REL
EQUITY
REL
FUTURE
Bought at Rs. 98
Sold at Rs. 109
Sell at Rs. 95
Buy at Rs. 105
PROFIT = RS. -3
PROFIT = RS. 4
NET PROFIT = RS. 1
82. Types of Futures
• There are three different kinds of futures with
three different dates of expiry which are last
Thursdays of next three months.
• E.g. Reliance Future 25 Jul
Reliance Future 29 Aug
Reliance Future 26 Sep
83. Different Types of Combination
• Just as price of Future follows the price of
equity, price of one Future also follows the
price of other Future given that both have
different dates of expiry.
RELIANCE
FUTURE
25 JULY
RELIANCE
FUTURE
29 AUG
85. Logic is same…
• Two instruments with price of one following
price of another.
• But this time each instrument is combination
of other two instruments.
RELIANCE
CALL OPTION
+
STRIKE PRICE
RELIANCE
PUT OPTION
+
FUTURE
86. EXAMPLE
Reliance Call option with Strike price 900
+
900
Reliance Put option with Strike price 900
+
Future of Reliance
91. 2. Order Value Check
• E.g. price of one share of Reliance is Rs 840 but a
user enters a limit order of Rs 1000 to buy this
share which is not acceptable.
• The valid Order Value Generation takes place only
if it compile with the Surveillance Measures set
for the User with respect to Maximum Single
Order Value (both Buy/Sell), Maximum Total
Order Value (both Buy/Sell) and Maximum Net
Value.
93. 3. Price Range check
• The order price generation mechanism strictly
follows the specified Range provided
protection to a trader to limit the risk within a
pre-set percentage of the Last Trade Price
(LTP). The percentage will greater than zero
and less than or equal to the applicable circuit
limits including dummy circuit limits in respect
of all algorithmic/single orders.
95. Technologies Used
• Qt Creator for all the front ends.
• Qt Creator is a cross-
platform C++integrated
development environment
which is part of the Qt SDK. It
includes a visual debugger and
an integrated GUI layout and
forms designer.
96. Sqlite3 as a database management
tool
• SQLite is a relational database
management system contained in
a small C programming library.
• Very easy to use and maintain.
• High speed queries.
• Uses very less memory.
• Only one query at a time.
• Have limited functionalities.
97. TCP Protocol for Communication
B/W
Front End and Backend
• Connection- oriented protocol with
acknowledgements.
• Very reliable protocol.
• Packets are delivered in order in which they are sent.
• Speed is slow due to acknowledgements overhead.
98. CONCLUSION
• Five Strategies are running live in
market with turnover of Rs 200
crores everyday.
• Three strategies are in testing
phase.
• Running Strategies cover
approximately 10 % of the total
algorithmic trading market
turnover in India.
99. FUTURE SCOPE
• Next target is to make an API so
that user can write his own
algorithms at his end without
prior knowledge in coding.
• Main purpose of making this API
is to maintain the privacy of user.