SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
Exploring Liquidity Aggregation Algorithm to
Calculate Volume for a Given VWAP Spread
A winning liquidity aggregation strategy requires the ability to both
tabulate potential profitability on bid/ask spreads and to accumulate
maximum liquidity (volume) available as part of market depth.
Executive Summary
There are special purpose trading tools available
in the market that can be used for liquidity aggre-
gation, especially where voluminous positions
must be hedged as a result of adverse moves in
security prices.
The latest trading tools have developed several
sophisticated features that can be leveraged when
a trader hedges positions within a very truncated
time span that creates minimal price movement
in the ladder. One of those fundamental features
is to acquire a position based on the user-entered
spread using volume-weighted average price
(VWAP) calculation.
This white paper covers the algorithmic aspects
used to calculate the available VWAP volume for
a given spread, including:
•	What is VWAP? The elaborated problem
statement of the algorithm.
•	Simplified case study to find the solution.
•	Formation of generic mathematical models.
•	Deriving the algorithm from mathematical
models.
What Is VWAP?
In finance, VWAP is the ratio of the value traded
of a particular security to the total volume traded
over a particular time horizon. In our problem
statement, however, we will consider the market
depth of a pricing ladder to constitute the volume
weighted average. It is a measure of the average
price a security traded at over the trading
time span.
Let’s understand the problem statement with
reference to the example in Figure 1 (next page)
of a ladder of EURUSD bid/ask prices.
Simplified Case Study to Find Solution
Figure 1 provides a problem statement based on
the market depth of the ask side of a ladder —
where the prices are sorted in ascending order
(i.e., best ask being the least price a trader can
afford for buying the security). If the trader
agrees to pay $1.274730 and expects to hedge as
much volume as possible, then without VWAP the
available volume in the illustrated ladder would be
23M (Price: $1.273957) + 16M (Price: $1.274730) =
39M.
However, our target is to maximize the volume
that can be hedged in this scenario. Hence, the
idea here is to afford some volume from an
expensive lot at the cost of the price that is saved
when acquiring cheaper lots in the ladder.
So, if we take the best two prices in the ladder
(price: $1.273957, volume: 23M and price:
• Cognizant 20-20 Insights
cognizant 20-20 insights | march 2014
2
$1.274730, volume: 16M), then the VWAP becomes
(1.273957*23 + 1.274730*16)/(23+16) = $1.274274.
This price is less than what the trader can afford
($1.274957). Hence, we take the next best prices
in the ladder until we reach the VWAP price
mentioned by the trader.
After taking the third-best price in the ladder
(price: $1.273957, volume: 23M, price: $1.274730,
volume: 16M, price: $1.275502, volume: 41M), our
VWAP becomes = (1.273957*23 + 1.274730*16 +
1.275502*41) / (23+16+41) = $1.274903.
Interestingly, we have afforded a price in the
ladder that is individually greater than the target
price set by the trader (ladder price: $1.275502,
trader quote: $1.274957), but the effective price
(VWAP) is less, so we can afford the next price in
the ladder.
While taking the fourth price in the ladder, we
see that if we afford 3M of $1.277048, then our
VWAP becomes = (1.273957*23 + 1.274730*16
+ 1.275502*41 + 1.277048*3) / (23+16+41+3) =
$1.274981, which is greater than the trader quote,
whereas if we take 2M of $1.277048, then our
VWAP becomes = (1.273957*23 + 1.274730*16
+ 1.275502*41 + 1.277048*3) / (23+16+41+3) =
$1.274956, which is just less than the trader quote.
Hence, if we go by VWAP, we can afford a volume
of 82M with a VWAP of $1.274956.
In the next section, we will derive an algebraic
model to identify the way to determine the VWAP
volume.
Formation of Generic Mathematical
Model
The following steps are critical for deriving the
algorithmic model used above:
•	Consider generic values in market depth (V1:P1,
V2:P2,…Vn:Pn). Here, V1 is the volume at the 1st
position in the ladder, and P1 is the correspond-
ing price.
•	There can be Max 1 lot (Min 0 lot) in market
depth where volume will split to support
a given VWAP. Let’s say it is Vx — Px. So the
market depth becomes
V1 — P1
V2 — P2
...
Vx — Px
...
Vn — Pn
•	Let’s assume that the required volume from
the Vx — Px lot is Vr. Then total money spent
will become :
V1*P1+V2*P2+….+Vr*Px =
Sum(Vi*Pi) + Px*Vr where i
varies from 1 to (x-1).
•	Let’s assume that the VWAP given is Pv (89.2
in the above case). Then, total money spent will
be = (V1+V2+…Vx-1+Vr)*Pv = (Sum(Vi)+Vr)*Pv
where i varies from 1 to (x-1).
•	Equating both sides gives us:
Sum(Vi*Pi) + Px*Vr where i varies
from 1 to (x-1) = (V1+V2+…Vx-
1+Vr)*Pv=(Sum(Vi)+Vr)*Pv where i
varies from 1 to (x-1)
Or,
cognizant 20-20 insights
Figure 1
As the ladder above shows, Best Ask is 1.273957
with a volume of 23M. Market depth is 1.27473
with volume 16M, 1.275502 with volume 41M,
1.277048 with volume 8M, and so on. Let’s as-
sume that a trader wishes to hedge his position,
and he agrees to afford a spread of 10 pips from
the Best Ask. Hence, he can afford a price of
1.274957 and he is expecting to hedge an infinite
volume (or as much as possible). We will try to
find out technically how much will he be able to
hedge (assuming that no other trader is present
in the market at this point in time to acquire any
similar position in the same ladder).
3cognizant 20-20 insights
Vr*Px — Vr*Pv = Sum(Vi)*Pv -
Sum(Vi*Pi)
Or,
Vr*(Px-Pv)= Sum(Vi)*Pv -
Sum(Vi*Pi)
Or,
Vr = {Sum(Vi)*Pv - Sum(Vi*Pi)}/
(Px-Pv)
So, the total volume that can be technically availed
is — Sum(Vi) + Vr where i varies from 1 to (x-1),
and value of Vr is -: { Sum(Vi)*Pv - Sum(Vi*Pi)}/
(Px-Pv)
Deriving the Algorithm from a
Mathematical Model
The basic steps of the algorithm include:
•	Assumptions:
For the ask side of the ladder, prices are sorted
in ascending order.
>> Every price with its volume will be called a
lot in the algorithm.
>> Algorithm for ASK is shown below; algorithm
for BID will be exactly same as that of ASK;
only the comparator signs will be reversed
(all greater than will become less than and
vice-versa).
>> Input to the algorithm is a set of lots and the
VWAP price is quoted by the trader (Pv).
>> Output to the algorithm will be the volume
and effective VWAP achieved.
•	Algorithm:
Initialize below variables:
>> totalPriceMultipliedByVol = 0
>> totalVol = 0
>> For every lot in the ladder execute the below
steps (start a for loop):
»» Take the price of the lot, multiply with the
volume available (let’s say Vi). Store it in
a variable (e.g., X).
»» If (totalPriceMultipliedByVol + X<Pv*(
totalVol*Vi)), then totalVol = totalVol + Vi
and totalPriceMultipliedByVol = totalPri-
ceMultipliedByVol + X.
»» Then this is the lot that will be split. Store
this lot (Px:Vx); break the loop.
>> Beyond the loop, check on whether Px:Vx
is found. If it is not found, then that means
we can consume the entire ladder. Hence,
in that case the effective VWAP will be to-
talPriceMultipliedByVol/totalVol, and VWAP
volume will be totalVol.
>> If Px:Vx is found, then:
»» VWAP volume (totalVol + VV), where
VV= (totalVol*Pv — totalPriceMultiplied-
ByVol)/(Px — Pv).
»» Effective VWAP = (totalPriceMultiplied-
ByVol + VV*Px)/(VV + totalVol).
Benefits of Volume Calculation Based
on VWAP
If we hedge our position with a given price, we
will end up with the cumulative volume of those
lots where the individual lot prices are either less
than or equal to the given quote. Whereas, if we
go with volume acquisition based on the VWAP
algorithm, we can afford a few lots that have indi-
vidual prices above the given quote, thus generat-
ing more volume.
In our example, for example, we could get a cumu-
lative volume of 39M (23M with price 1.273957,
16M with price 1.274730), whereas with appli-
cation of VWAP algorithm we could hedge our
position with 82M of volume.
One noteworthy point here is that the VWAP
algorithm is useful only when we wish to acquire
more volume within a given spread of price.
Hence, specifically for liquidity aggregation
purposes, volume calculation based on VWAP
prices is certainly effective.
Within the currency trading (FX) domain (FX
ladder), the VWAP algorithm is more popular
and frequently used, because of the existence of
numerous exchange venues (like EBS, Reuters,
HotSpot, 360T, etc.) that provide huge liquidity for
many currencies. Hence, even usage of a virtual
order book (VOB) along with the VWAP algorithm
is very effective in liquidity aggregation.
About Cognizant
Cognizant (NASDAQ: CTSH) is a leading provider of information technology, consulting, and business process out-
sourcing services, dedicated to helping the world’s leading companies build stronger businesses. Headquartered in
Teaneck, New Jersey (U.S.), Cognizant combines a passion for client satisfaction, technology innovation, deep industry
and business process expertise, and a global, collaborative workforce that embodies the future of work. With over 50
delivery centers worldwide and approximately 171,400 employees as of December 31, 2013, Cognizant is a member of
the NASDAQ-100, the S&P 500, the Forbes Global 2000, and the Fortune 500 and is ranked among the top performing
and fastest growing companies in the world. Visit us online at www.cognizant.com or follow us on Twitter: Cognizant.
World Headquarters
500 Frank W. Burr Blvd.
Teaneck, NJ 07666 USA
Phone: +1 201 801 0233
Fax: +1 201 801 0243
Toll Free: +1 888 937 3277
Email: inquiry@cognizant.com
European Headquarters
1 Kingdom Street
Paddington Central
London W2 6BD
Phone: +44 (0) 20 7297 7600
Fax: +44 (0) 20 7121 0102
Email: infouk@cognizant.com
India Operations Headquarters
#5/535, Old Mahabalipuram Road
Okkiyam Pettai, Thoraipakkam
Chennai, 600 096 India
Phone: +91 (0) 44 4209 6000
Fax: +91 (0) 44 4209 6060
Email: inquiryindia@cognizant.com
­­© Copyright 2014, Cognizant. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission from Cognizant. The information contained herein is
subject to change without notice. All other trademarks mentioned herein are the property of their respective owners.
About the Author
Nishit Kumar Ghosh is a Project Manager who leads Cognizant’s Wealth Management Team at one of the
company’s major banking clients. He has a decade of experience in techno-functional roles in market
risk domain, FX front-office trading algorithm development, wealth management and low-latency pro-
gramming. Nishit has worked in Europe and APAC regions delivering transformational projects for large
financial institutions. He can be reached at Nishitk.Ghosh@cognizant.com.

Más contenido relacionado

Más de Cognizant

Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...
Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...
Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...Cognizant
 
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-making
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-makingData Modernization: Breaking the AI Vicious Cycle for Superior Decision-making
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-makingCognizant
 
It Takes an Ecosystem: How Technology Companies Deliver Exceptional Experiences
It Takes an Ecosystem: How Technology Companies Deliver Exceptional ExperiencesIt Takes an Ecosystem: How Technology Companies Deliver Exceptional Experiences
It Takes an Ecosystem: How Technology Companies Deliver Exceptional ExperiencesCognizant
 
Intuition Engineered
Intuition EngineeredIntuition Engineered
Intuition EngineeredCognizant
 
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...Cognizant
 
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesEnhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesCognizant
 
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateThe Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateCognizant
 
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...Cognizant
 
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Cognizant
 
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Cognizant
 
Green Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityGreen Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityCognizant
 
Policy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersPolicy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersCognizant
 
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalThe Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalCognizant
 
AI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueAI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueCognizant
 
Operations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachOperations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachCognizant
 
Five Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudFive Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudCognizant
 
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedGetting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedCognizant
 
Crafting the Utility of the Future
Crafting the Utility of the FutureCrafting the Utility of the Future
Crafting the Utility of the FutureCognizant
 
Utilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformUtilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformCognizant
 
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...Cognizant
 

Más de Cognizant (20)

Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...
Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...
Using Adaptive Scrum to Tame Process Reverse Engineering in Data Analytics Pr...
 
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-making
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-makingData Modernization: Breaking the AI Vicious Cycle for Superior Decision-making
Data Modernization: Breaking the AI Vicious Cycle for Superior Decision-making
 
It Takes an Ecosystem: How Technology Companies Deliver Exceptional Experiences
It Takes an Ecosystem: How Technology Companies Deliver Exceptional ExperiencesIt Takes an Ecosystem: How Technology Companies Deliver Exceptional Experiences
It Takes an Ecosystem: How Technology Companies Deliver Exceptional Experiences
 
Intuition Engineered
Intuition EngineeredIntuition Engineered
Intuition Engineered
 
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
The Work Ahead: Transportation and Logistics Delivering on the Digital-Physic...
 
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital InitiativesEnhancing Desirability: Five Considerations for Winning Digital Initiatives
Enhancing Desirability: Five Considerations for Winning Digital Initiatives
 
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility MandateThe Work Ahead in Manufacturing: Fulfilling the Agility Mandate
The Work Ahead in Manufacturing: Fulfilling the Agility Mandate
 
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
The Work Ahead in Higher Education: Repaving the Road for the Employees of To...
 
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...Engineering the Next-Gen Digital Claims Organisation for Australian General I...
Engineering the Next-Gen Digital Claims Organisation for Australian General I...
 
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
Profitability in the Direct-to-Consumer Marketplace: A Playbook for Media and...
 
Green Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for SustainabilityGreen Rush: The Economic Imperative for Sustainability
Green Rush: The Economic Imperative for Sustainability
 
Policy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for InsurersPolicy Administration Modernization: Four Paths for Insurers
Policy Administration Modernization: Four Paths for Insurers
 
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with DigitalThe Work Ahead in Utilities: Powering a Sustainable Future with Digital
The Work Ahead in Utilities: Powering a Sustainable Future with Digital
 
AI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to ValueAI in Media & Entertainment: Starting the Journey to Value
AI in Media & Entertainment: Starting the Journey to Value
 
Operations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First ApproachOperations Workforce Management: A Data-Informed, Digital-First Approach
Operations Workforce Management: A Data-Informed, Digital-First Approach
 
Five Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the CloudFive Priorities for Quality Engineering When Taking Banking to the Cloud
Five Priorities for Quality Engineering When Taking Banking to the Cloud
 
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining FocusedGetting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
Getting Ahead With AI: How APAC Companies Replicate Success by Remaining Focused
 
Crafting the Utility of the Future
Crafting the Utility of the FutureCrafting the Utility of the Future
Crafting the Utility of the Future
 
Utilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data PlatformUtilities Can Ramp Up CX with a Customer Data Platform
Utilities Can Ramp Up CX with a Customer Data Platform
 
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
The Work Ahead in Intelligent Automation: Coping with Complexity in a Post-Pa...
 

Último

Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...lizamodels9
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876dlhescort
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 

Último (20)

unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
Call Girls In Holiday Inn Express Gurugram➥99902@11544 ( Best price)100% Genu...
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 

Exploring Liquidity Aggregation Algorithm to Calculate Volume for a Given VWAP Spread

  • 1. Exploring Liquidity Aggregation Algorithm to Calculate Volume for a Given VWAP Spread A winning liquidity aggregation strategy requires the ability to both tabulate potential profitability on bid/ask spreads and to accumulate maximum liquidity (volume) available as part of market depth. Executive Summary There are special purpose trading tools available in the market that can be used for liquidity aggre- gation, especially where voluminous positions must be hedged as a result of adverse moves in security prices. The latest trading tools have developed several sophisticated features that can be leveraged when a trader hedges positions within a very truncated time span that creates minimal price movement in the ladder. One of those fundamental features is to acquire a position based on the user-entered spread using volume-weighted average price (VWAP) calculation. This white paper covers the algorithmic aspects used to calculate the available VWAP volume for a given spread, including: • What is VWAP? The elaborated problem statement of the algorithm. • Simplified case study to find the solution. • Formation of generic mathematical models. • Deriving the algorithm from mathematical models. What Is VWAP? In finance, VWAP is the ratio of the value traded of a particular security to the total volume traded over a particular time horizon. In our problem statement, however, we will consider the market depth of a pricing ladder to constitute the volume weighted average. It is a measure of the average price a security traded at over the trading time span. Let’s understand the problem statement with reference to the example in Figure 1 (next page) of a ladder of EURUSD bid/ask prices. Simplified Case Study to Find Solution Figure 1 provides a problem statement based on the market depth of the ask side of a ladder — where the prices are sorted in ascending order (i.e., best ask being the least price a trader can afford for buying the security). If the trader agrees to pay $1.274730 and expects to hedge as much volume as possible, then without VWAP the available volume in the illustrated ladder would be 23M (Price: $1.273957) + 16M (Price: $1.274730) = 39M. However, our target is to maximize the volume that can be hedged in this scenario. Hence, the idea here is to afford some volume from an expensive lot at the cost of the price that is saved when acquiring cheaper lots in the ladder. So, if we take the best two prices in the ladder (price: $1.273957, volume: 23M and price: • Cognizant 20-20 Insights cognizant 20-20 insights | march 2014
  • 2. 2 $1.274730, volume: 16M), then the VWAP becomes (1.273957*23 + 1.274730*16)/(23+16) = $1.274274. This price is less than what the trader can afford ($1.274957). Hence, we take the next best prices in the ladder until we reach the VWAP price mentioned by the trader. After taking the third-best price in the ladder (price: $1.273957, volume: 23M, price: $1.274730, volume: 16M, price: $1.275502, volume: 41M), our VWAP becomes = (1.273957*23 + 1.274730*16 + 1.275502*41) / (23+16+41) = $1.274903. Interestingly, we have afforded a price in the ladder that is individually greater than the target price set by the trader (ladder price: $1.275502, trader quote: $1.274957), but the effective price (VWAP) is less, so we can afford the next price in the ladder. While taking the fourth price in the ladder, we see that if we afford 3M of $1.277048, then our VWAP becomes = (1.273957*23 + 1.274730*16 + 1.275502*41 + 1.277048*3) / (23+16+41+3) = $1.274981, which is greater than the trader quote, whereas if we take 2M of $1.277048, then our VWAP becomes = (1.273957*23 + 1.274730*16 + 1.275502*41 + 1.277048*3) / (23+16+41+3) = $1.274956, which is just less than the trader quote. Hence, if we go by VWAP, we can afford a volume of 82M with a VWAP of $1.274956. In the next section, we will derive an algebraic model to identify the way to determine the VWAP volume. Formation of Generic Mathematical Model The following steps are critical for deriving the algorithmic model used above: • Consider generic values in market depth (V1:P1, V2:P2,…Vn:Pn). Here, V1 is the volume at the 1st position in the ladder, and P1 is the correspond- ing price. • There can be Max 1 lot (Min 0 lot) in market depth where volume will split to support a given VWAP. Let’s say it is Vx — Px. So the market depth becomes V1 — P1 V2 — P2 ... Vx — Px ... Vn — Pn • Let’s assume that the required volume from the Vx — Px lot is Vr. Then total money spent will become : V1*P1+V2*P2+….+Vr*Px = Sum(Vi*Pi) + Px*Vr where i varies from 1 to (x-1). • Let’s assume that the VWAP given is Pv (89.2 in the above case). Then, total money spent will be = (V1+V2+…Vx-1+Vr)*Pv = (Sum(Vi)+Vr)*Pv where i varies from 1 to (x-1). • Equating both sides gives us: Sum(Vi*Pi) + Px*Vr where i varies from 1 to (x-1) = (V1+V2+…Vx- 1+Vr)*Pv=(Sum(Vi)+Vr)*Pv where i varies from 1 to (x-1) Or, cognizant 20-20 insights Figure 1 As the ladder above shows, Best Ask is 1.273957 with a volume of 23M. Market depth is 1.27473 with volume 16M, 1.275502 with volume 41M, 1.277048 with volume 8M, and so on. Let’s as- sume that a trader wishes to hedge his position, and he agrees to afford a spread of 10 pips from the Best Ask. Hence, he can afford a price of 1.274957 and he is expecting to hedge an infinite volume (or as much as possible). We will try to find out technically how much will he be able to hedge (assuming that no other trader is present in the market at this point in time to acquire any similar position in the same ladder).
  • 3. 3cognizant 20-20 insights Vr*Px — Vr*Pv = Sum(Vi)*Pv - Sum(Vi*Pi) Or, Vr*(Px-Pv)= Sum(Vi)*Pv - Sum(Vi*Pi) Or, Vr = {Sum(Vi)*Pv - Sum(Vi*Pi)}/ (Px-Pv) So, the total volume that can be technically availed is — Sum(Vi) + Vr where i varies from 1 to (x-1), and value of Vr is -: { Sum(Vi)*Pv - Sum(Vi*Pi)}/ (Px-Pv) Deriving the Algorithm from a Mathematical Model The basic steps of the algorithm include: • Assumptions: For the ask side of the ladder, prices are sorted in ascending order. >> Every price with its volume will be called a lot in the algorithm. >> Algorithm for ASK is shown below; algorithm for BID will be exactly same as that of ASK; only the comparator signs will be reversed (all greater than will become less than and vice-versa). >> Input to the algorithm is a set of lots and the VWAP price is quoted by the trader (Pv). >> Output to the algorithm will be the volume and effective VWAP achieved. • Algorithm: Initialize below variables: >> totalPriceMultipliedByVol = 0 >> totalVol = 0 >> For every lot in the ladder execute the below steps (start a for loop): »» Take the price of the lot, multiply with the volume available (let’s say Vi). Store it in a variable (e.g., X). »» If (totalPriceMultipliedByVol + X<Pv*( totalVol*Vi)), then totalVol = totalVol + Vi and totalPriceMultipliedByVol = totalPri- ceMultipliedByVol + X. »» Then this is the lot that will be split. Store this lot (Px:Vx); break the loop. >> Beyond the loop, check on whether Px:Vx is found. If it is not found, then that means we can consume the entire ladder. Hence, in that case the effective VWAP will be to- talPriceMultipliedByVol/totalVol, and VWAP volume will be totalVol. >> If Px:Vx is found, then: »» VWAP volume (totalVol + VV), where VV= (totalVol*Pv — totalPriceMultiplied- ByVol)/(Px — Pv). »» Effective VWAP = (totalPriceMultiplied- ByVol + VV*Px)/(VV + totalVol). Benefits of Volume Calculation Based on VWAP If we hedge our position with a given price, we will end up with the cumulative volume of those lots where the individual lot prices are either less than or equal to the given quote. Whereas, if we go with volume acquisition based on the VWAP algorithm, we can afford a few lots that have indi- vidual prices above the given quote, thus generat- ing more volume. In our example, for example, we could get a cumu- lative volume of 39M (23M with price 1.273957, 16M with price 1.274730), whereas with appli- cation of VWAP algorithm we could hedge our position with 82M of volume. One noteworthy point here is that the VWAP algorithm is useful only when we wish to acquire more volume within a given spread of price. Hence, specifically for liquidity aggregation purposes, volume calculation based on VWAP prices is certainly effective. Within the currency trading (FX) domain (FX ladder), the VWAP algorithm is more popular and frequently used, because of the existence of numerous exchange venues (like EBS, Reuters, HotSpot, 360T, etc.) that provide huge liquidity for many currencies. Hence, even usage of a virtual order book (VOB) along with the VWAP algorithm is very effective in liquidity aggregation.
  • 4. About Cognizant Cognizant (NASDAQ: CTSH) is a leading provider of information technology, consulting, and business process out- sourcing services, dedicated to helping the world’s leading companies build stronger businesses. Headquartered in Teaneck, New Jersey (U.S.), Cognizant combines a passion for client satisfaction, technology innovation, deep industry and business process expertise, and a global, collaborative workforce that embodies the future of work. With over 50 delivery centers worldwide and approximately 171,400 employees as of December 31, 2013, Cognizant is a member of the NASDAQ-100, the S&P 500, the Forbes Global 2000, and the Fortune 500 and is ranked among the top performing and fastest growing companies in the world. Visit us online at www.cognizant.com or follow us on Twitter: Cognizant. World Headquarters 500 Frank W. Burr Blvd. Teaneck, NJ 07666 USA Phone: +1 201 801 0233 Fax: +1 201 801 0243 Toll Free: +1 888 937 3277 Email: inquiry@cognizant.com European Headquarters 1 Kingdom Street Paddington Central London W2 6BD Phone: +44 (0) 20 7297 7600 Fax: +44 (0) 20 7121 0102 Email: infouk@cognizant.com India Operations Headquarters #5/535, Old Mahabalipuram Road Okkiyam Pettai, Thoraipakkam Chennai, 600 096 India Phone: +91 (0) 44 4209 6000 Fax: +91 (0) 44 4209 6060 Email: inquiryindia@cognizant.com ­­© Copyright 2014, Cognizant. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission from Cognizant. The information contained herein is subject to change without notice. All other trademarks mentioned herein are the property of their respective owners. About the Author Nishit Kumar Ghosh is a Project Manager who leads Cognizant’s Wealth Management Team at one of the company’s major banking clients. He has a decade of experience in techno-functional roles in market risk domain, FX front-office trading algorithm development, wealth management and low-latency pro- gramming. Nishit has worked in Europe and APAC regions delivering transformational projects for large financial institutions. He can be reached at Nishitk.Ghosh@cognizant.com.