Open API

Mifid 2 requires 4 costs breakdowns.

  • Cost breakdown by type
  • Illustration of PL effect of costs on account level
  • Illustration of PL effect of costs on instrument level
  • Total costs incurred per trade

The first 3 of these items can be done using the aggregated Amounts endpoint.

The last needs a combination of data from Trades and Bookings.

The below examples can be seen done in Excel in the sample file here:

Download MiFID Sample

Costs breakdown by type:

Mifid 2 only asks that amounts are broken down into high level categories; however, it furthermore states that these amounts shall be broken down for clients upon request, and for that reason it is easier to do the breakdown upfront.

In order to do a breakdown in Clientcurrency we need to use 4 columns from the returned data:

  • AmountClass
  • AmountSubClass
  • AmountType
  • AmountClientCurrency

By grouping the the AmountInClientcurrency by AmountClass, AmountSubClass and AmountType, and then splitting the amounts our per quarter we get the following table:

Row Labels2015-12015-22015-32015-42016-12016-22016-32016-42017-12017-22017-32017-4Grand Total
 InstrumentRelated-21-63-32-44-26 -17-1-5 -10-6-224
  CFD Finance-21-63-32-44-26 -17-1-5 -10-6-224
 NonBookedCosts           88
  Fx-RollOver           88
 NonInstrumentRelated -23-14 -9-17-27-87-560-1-2-235
  Interest -23-14 -10-20-110-1-2-54
  Service Billing Amounts    -8-16-25-87-45   -181
  Exchange Fee-7 -32-7-7-14-18-8 -4 0-97
 NonBookedCosts           -28-28
  CFD Markup           -16-16
  CurrencyConversion           -1-1
  Fx Spread           -11-11
Grand Total-210-130-445-550-464-152-437-859-272-277-137-243-4,175

We will also need the Total Costs as a percentage of average account value in the period.

In order to do that we will calculate the average account value in the period using two calculated amounts : -3 & -4 ( Cash balance and Positions values)

The calculation is done by taking the average value of the Sum of the two amounts:

in other words to get it for first quarter 2015: 

Acount Value on day = sum(  Cash balance +Position Values) where date = 2015-01-01

Average account value=  Average( Account Value) where month in (1,2,3) and Year = 2015

In order to get the cost as a percentage of the average account values we simply divide the two numbers.

Cost percentage in quarter= Total cost in Quarter/Average Account Value

This gives us the following table

Cost Schedule2015-12015-22015-32015-42016-12016-22016-32016-42017-12017-22017-32017-4
Total Cost-210-130-445-550-464-152-437-859-272-277-137-243
Average Account Value8,2378,6657,9066,5452,3141,8426,07410,4852,7665,2742,1021,925
Cost Percentage-2.5%-1.5%-5.6%-8.4%-20.0%-8.3%-7.2%-8.2%-9.8%-5.3%-6.5%-12.6%

This is equal to to what is shown in SaxoTraderGo Portfolio report:

Illustration of PL effect of costs on account level

To do a chart of PL effect of costs on account level we first need a PL chart

PnL Chart:

  1. filter data to only return AmountTypeId = -5 (PnL)
  2. Remove data where assetType = 'CM' and where Assettype = '' and where AssetType = 'IC'
  3. Group and sum values by date in either Account or Client currency

This returns a list of the Pnl per date and can also be done per assettype, Instrument, Month etc.

Once we have the Pnl Chart we need the costs per day:

These are found by summing all amounts where AmountType = 'TransactionCosts' or AmountType = 'OngoingCharges'

Once these are done we can create the following table where the PnL is summarized cumulatively together with the PnL excl Cost:

DatePnLOngoingChargesTransactionCostsCumulative PLCumulative PL ex costs

And a chart illustrating cost effect on Pnl ( from Saxo Portfolio report)

Illustration of PL effect of costs on instrument level

To do a table with PL effect of costs on Instrument level we first need PL per instrument

PnL Chart:

  1. filter data to only return AmountTypeId = -5 (PnL)
  2. Remove data where assetType = 'CM' and where Assettype = '' and where AssetType = 'IC'
  3. Group and sum values by instrument in either Account or Client currency

This returns a list of the Pnl per instrument asplit into assettype if needed.

Once we have PnL per instrument we need to find the costs associated with each instrument in the period:

This is done by summing all aggregatedAmounts for the instrument where AmountType = 'TransactionCosts' or AmountType = 'OngoingCharges'

To the the PnL Ex costs, we simply subtract the costs ( these are usually negative so PnL ex Costs should be larger than PnL).

This leads to a table with the following format:

Row LabelsSum of AmountClientCurrencyOngoingChargesTransactionCostsPL PL ex costs Inc.-105.97-6.70-125.67-105.9726.40
British Pound/US Dollar-272.350.00-70.01-272.35-202.34
Canadian Dollar/Swiss franc1.770.00-70.281.7772.05
Danske Bank A/S-593.23-10.23-79.00-593.23-504.00
Denmark 201.250.00-0.751.252.00
Deutsche Bank  Sep2017 14 C7,994.030.00-119.147,994.038,113.17
EU Stocks 50-116.440.000.00-116.44-116.44
Euro/Russian Ruble-68.667.66-78.54-68.662.22
Euro/US Dollar-5,586.290.00-559.61-5,586.29-5,026.68
IG Group Holdings Plc-4,016.010.00-70.97-4,016.01-3,945.04
National Bank of Greece SA-469.15-10.51-89.78-469.15-368.86
Netherlands 2519.45-5.81-10.5019.4535.76
Novo Nordisk A/S Jun2017 44 C-335.970.00-30.71-335.97-305.26
Novo Nordisk A/S Jun2017 45 C-547.150.00-10.43-547.15-536.72
Petroleum Geo-Services-188.86-26.38-308.57-188.86146.09
Riot Blockchain Inc.999.310.00-151.39999.311,150.70
Stora Enso Oyj R-692.13-6.27-127.25-692.13-558.61
Ubiquiti Networks Inc.1,439.34-131.90-430.071,439.342,001.31
US Dollar/Japanese Yen-71.690.00-70.58-71.69-1.11
US SPX500420.55-23.30-1.05420.55444.90
US Tech. 100 NAS-144.64-2.990.00-144.64-141.65
Volatility Index (VIX) Aug2015 15 C-2,300.440.00-118.18-2,300.44-2,182.26
Volatility Index (VIX) Aug2015 16 P690.920.00-93.94690.92784.86
Volatility Index (VIX) Dec2016 15 P528.750.00-83.49528.75612.24
Volatility Index (VIX) Feb2017 18 C-4,226.860.00-63.30-4,226.86-4,163.57
Volatility Index (VIX) Jan2015 15.000 C3,533.980.00-44.773,533.983,578.75
Volatility Index (VIX) Jan2016 20 P-4,742.280.00-89.23-4,742.28-4,653.05
Volatility Index (VIX) Jan2017 16 C-5,891.670.00-86.09-5,891.67-5,805.58
Volatility Index (VIX) Jul2016 17 P1,528.120.00-93.701,528.121,621.82
Volatility Index (VIX) Jun2016 20 C-2,031.650.00-46.58-2,031.65-1,985.07
Volatility Index (VIX) May2016 19 C-1,169.150.00-43.18-1,169.15-1,125.97
Volatility Index (VIX) May2016 22 C-738.240.00-43.16-738.24-695.08
Volatility Index (VIX) Nov2016 15 P914.240.00-83.12914.24997.35
Volatility Index (VIX) Oct2016 15 C-991.210.00-43.96-991.21-947.25
Volatility Index (VIX) Oct2017 10 P-377.810.00-205.08-377.81-172.73
Volatility Index (VIX) Oct2017 11 C-64.230.00-40.73-64.23-23.50
Volatility Index (VIX) Sep2016 24 C-521.700.00-43.84-521.70-477.86
Wealth Invest - Saxo Global Equities-73.000.00-48.00-73.00-25.00
Wealth Invest Sirius Balance6.900.00-48.006.9054.90

Which compares to the overview found in Saxo Portolio report

Settlement Note:

The settlement note is a legal requirement from Pre mifid 2, but the requirements have been enchanced with Mifid2 especiallt around costs.

It consists of a combination of trade information ( price, amount, direction, exchange etc) and Bookings related to the trade ( P/L, Share amounts, Commission, stamp duty etc).

The trade level data also includes the spread or markup on FX and CFDs while the bookings include the currency conversion incurred per booking when trading instruments in currency different from the account currency.

In order to construct the Settlement Note trade related details need to be taken from Trades endpoint.

Using the trade id found in the trades endpoint, the bookings endpoint can be queried to attain all related bookings.

In order to calculate the total costs for the trade we need to add together:

  • (Bookings endpoint) Sum of all bookings classified via AmountType as "transactioncost" ( same method as for aggregated amountd) this will ignore PL bookings and share amounts etc.  
  • (bookings endpoint) Sum of currency conversion for all bookings for the trade, including bookings not classified as transactioncosts
  • (Trades endpoint)    Spread/Markup
TradedateTradeIdinstrumentBuySellAmountPriceTraded ValueBooked Amount
(Acc CCY)
 (Client ccy)
conversion cost ( client ccy)
Other Trade CostsTotal Costs
2016-05-27953294941Dong Energy A/STransferIn1.
2016-06-03955820682Euro/US DollarSold-5000.001.115,569.90-2.21-0.33-0.01-2.21-2.55
2016-06-03955850636Euro/US DollarBought5000.001.12-5,599.40-199.16-14.40-0.99-2.27-17.66
2016-06-03955903347Euro/US DollarSold-5000.001.125,624.00-2.26-0.98-0.01-2.26-3.25
2016-06-03955977063Euro/US DollarBought5000.001.13-5,649.15-168.67-0.49-0.84-2.25-3.58
2016-06-03956069796Dong Energy A/STransferOut-
2016-06-13959955753Volatility Index (VIX) Jun2016 20 CBought2.001.50-300.00-2031.650.00-10.10-46.58-56.68
2016-06-13959963070Volatility Index (VIX) Jul2016 17 PBought2.001.20-240.00-1635.580.00-8.14-46.61-54.75
2016-06-24964726344Euro/US DollarBought10000.000.01-102.90-723.77-126.12-0.72-33.54-160.38
2016-06-29967148917Volatility Index (VIX) Jun2016 20 CSold-
2016-07-08972397964Volatility Index (VIX) Jul2016 17 PSold-2.002.40480.003163.700.00-15.90-47.09-62.99
2016-07-18978021282US Tech. 100 NASBought1.004621.76-4,621.760.000.840.000.000.84
2016-07-18978022359Volatility Index (VIX) Sep2016 24 CBought1.001.05-105.00-732.740.00-3.64-23.77-27.41
2016-07-19978244460US Tech. 100 NASSold-1.004599.984,599.98-147.240.84-0.740.000.10
2016-07-21979930444Volatility Index (VIX) Oct2016 15 CBought1.004.70-470.00-3215.590.00-16.00-23.90-39.90
2016-08-05986301769US SPX500Sold-1.002178.792,178.790.000.500.000.000.50
2016-08-05986302575US SPX500Bought1.002179.17-2,179.17-2.570.50-
2016-08-05986310062US SPX500Bought1.002180.63-2,180.630.000.500.000.000.50
2016-08-08986449481US SPX500Sold-1.002181.152,181.153.470.50-
2016-08-08986827453US SPX500Bought3.002181.67-6,545.010.001.520.000.001.52
2016-08-09987298895US SPX500Sold-3.002185.006,555.0066.511.51-0.330.001.18

Which allow us to construct the following: