{"id":11145,"date":"2019-07-22T09:53:33","date_gmt":"2019-07-22T13:53:33","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=11145"},"modified":"2025-02-07T15:10:39","modified_gmt":"2025-02-07T20:10:39","slug":"pricing-floating-legs-of-interest-rate-swaps-with-r","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/","title":{"rendered":"Pricing Floating Legs of Interest Rate Swaps with R"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this post we will close the trilogy on (old style) swap pricing. In particular, we will download the <em>variable rate data<\/em>, which is needed to calculate the variable leg accrual. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download the Data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>To learn how to download the code via Quandl, visit Davide&#8217;s website <\/em><a href=\"https:\/\/www.curiousfrm.com\/2019\/07\/downloading-variable-rate\/\"><em>https:\/\/www.curiousfrm.com\/2019\/07\/downloading-variable-rate\/<\/em><\/a>.  <em>To recap: <\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.curiousfrm.com\/2019\/03\/using-the-tidyverse-for-swap-pricing\/\">Part 1<\/a>&nbsp;of this series gave the general idea behind <code>tidy <\/code>pricing interest rate swaps using a <code>7 lines pipe<\/code><\/li><li><a href=\"https:\/\/www.curiousfrm.com\/2019\/04\/real-world-tidy-interest-rate-swap-pricing\/\">Part 2<\/a>&nbsp;went much more into detail and priced some real world contract comparing the results obtained vs Bloomberg.<\/li><li>The only part missing was calculating the accrual for the floating leg. To do this we need the information about the historical level of the interest rate to which the leg is linked. For standard EUR contracts, this rate is the 6 months\u2019 EURIBOR. For those of you who are interested in understanding more what this rate is, see&nbsp;<a href=\"https:\/\/www.euribor-rates.eu\/what-is-euribor.asp\">this link<\/a>.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>This post will continue below with a focus on the R packages and sample code<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">R Packages and Functions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s look at the code now. The function that gets modified the most is the&nbsp;<code>SwapCashflowYFCalculation<\/code>&nbsp;which I have re-named as&nbsp;<code>CashFlowPricing<\/code>&nbsp;one which now looks as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CashFlowPricing  &lt;- function(today, start.date, maturity.date, type,\n                                     time.unit, dcc, calendar) {\n  # Part 1: Calculate the whole cashflow dates\n  cashflows &lt;- seq(from = 0,\n                   to = (lubridate::year(maturity.date) -\n                           lubridate::year(start.date)) * 12,\n                   by = time.unit) %>%\n    purrr::map_dbl(~RQuantLib::advance(calendar = calendar,\n                                       dates = start.date,\n                                       n = .x,\n                                       timeUnit = 2,\n                                       bdc = 1,\n                                       emr = TRUE)) %>%\n    lubridate::as_date() %>%\n    {if (start.date &lt; today) append(today, .) else .}\n\n  # Part 2: calculate accrual and rate fixing days\n  accrual.date &lt;- cashflows[today - cashflows > 0]\n\n  if (!identical(as.double(accrual.date), double(0))) {\n    accrual.date  %&lt;>%  max()\n    if (stringr::str_detect(type, \"floating\")) {\n      fixing.date &lt;- accrual.date %>%\n        {RQuantLib::advance(calendar = calendar,\n                            dates = .,\n                            n = -2,\n                            timeUnit = 0,\n                            bdc = 1,\n                            emr = TRUE)}\n    } else {\n      fixing.date &lt;- NULL\n    }\n    accrual.yf &lt;- accrual.date %>%\n      {RQuantLib::yearFraction(today, ., dcc)} %>%\n      `*`(-1)\n  } else {\n    fixing.date &lt;- NULL\n    accrual.yf &lt;- 0\n  }\n\n  # Part 3: Tidy and return the list of relevant dates\n  cashflows %&lt;>%\n    purrr::map_dbl(~RQuantLib::yearFraction(today, .x, dcc)) %>%\n    tibble::tibble(yf = .) %>%\n    dplyr::filter(yf >= 0)\n\n  return(list(cashflows = cashflows, accrual.yf = accrual.yf,\n              fixing.date = fixing.date))\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Reviewing the Output<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s  analyze the code:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Part 1<\/strong> is actually the core of the previously described code.  <\/li><li><strong>Part 2<\/strong> is the new code.&nbsp;<code>accrual.date<\/code>&nbsp;is the date from which the accrual starts to be calculated. This gets converted into a year fraction and saved into&nbsp;<code>accrual.yf<\/code>. The <code>if statement<\/code> calculates the date at which the floating EURIBOR rate has to be snapped from Quandl only for the floating rate. This date is stored in the&nbsp;<code>fixing.date<\/code>&nbsp;variable and it considers a 2 days lag which is standard for the European market.<\/li><li><strong>Part 3<\/strong> finally converts and returns all the future cash flows in terms of year fraction<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can note that we now calculate the cashflows for the floating leg even if it will note be used by the&nbsp;<code>OLDParSwapRate<\/code>&nbsp;function. This will be needed for future developments when we will introduce the OIS discounting\u2026(stay tuned!!)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I can now calculate the accrual, and for this purpose I developed a brand new function called&nbsp;<code>CalculateAccrual<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CalculateAccrual &lt;- function(swap.dates, leg.type, swap, direction) {\n  # Part 1: calculate the accrual rate\n  if (!is.null(swap.dates$fixing.date)) {\n    rate &lt;- Quandl::Quandl(\"BOF\/QS_D_IEUTIO6M\",\n                           start_date = swap.dates$fixing.date,\n                           end_date = swap.dates$fixing.date) %>%\n      tibble::as_tibble(.) %>%\n      dplyr::select(Value) %>%\n      as.double %>%\n      `\/`(100)\n  } else {\n    rate &lt;- swap$strike\n  }\n  # Part 2: Calculate the value of the accrual\n  swap.dates %>%\n    purrr::pluck(\"accrual.yf\") %>%\n    `*`(swap$notional * rate * switch(leg.type, \"pay\" = -1, \"receive\" = 1))\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is smaller and easier function:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Part 1: <\/strong>for floating legs we use Quandl to download the needed data and extract the rate information. For the fixed one, we just use the strike of the swap.<\/li><li><strong>Part 2: <\/strong>we calculate the actual accrual amount using the classical function<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Final Results<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s see the final result on the 25 years\u2019 swap we use as test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>## # A tibble: 1 x 7\n##   swap.id  clean.mv dirty.mv accrual.pay accrual.receive     par    pv01\n##   &lt;chr>       &lt;dbl>    &lt;dbl>       &lt;dbl>           &lt;dbl>   &lt;dbl>   &lt;dbl>\n## 1 Swap 25y -881815. -874994.       5441.           1379. 0.00771 -12394.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Visit <\/em><a rel=\"noreferrer noopener\" href=\"https:\/\/www.curiousfrm.com\/\" target=\"_blank\"><em>curiousfrm.com<\/em><\/a> <em>to read the rest of the article, and learn how Davide compares the results vs Bloomberg data, and how his algorithm identifies the floating &amp; fixed legs depending on the type of the swap: <\/em><a href=\"https:\/\/www.curiousfrm.com\/2019\/07\/downloading-variable-rate\/\">https:\/\/www.curiousfrm.com\/2019\/07\/downloading-variable-rate\/<\/a> <br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Davide Magno is&nbsp;a professional financial engineer with more than 10 years of experience of managing complex financial quantitative tasks for banks, insurances and funds.&nbsp;He is passionate about both quantitative finance and data science: he is the author of the blog&nbsp;<\/em><a rel=\"noreferrer noopener\" href=\"https:\/\/www.curiousfrm.com\/\" target=\"_blank\"><em>curiousfrm.com<\/em><\/a><em>&nbsp;that aims at solving financial problems using modern data science coding languages and techniques. He is currently Head of Financial Risk Management in Axa Life Europe dac. Opinions expressed are solely his and do not express the views or opinions of his current employer.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.<\/p>\n","protected":false},"author":123,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,338,341,351,344,342],"tags":[851,2463,806,2459,1407,2461,487,2462,1045],"contributors-categories":[13656],"class_list":["post-11145","post","type-post","status-publish","format-standard","category-data-science","category-programing-languages","category-ibkr-quant-news","category-quant-development","category-quant-europe","category-quant-regions","category-r-development","tag-algo-trading","tag-calculateaccrual","tag-data-science","tag-euribor","tag-lubridate","tag-purr","tag-r","tag-rquantlib","tag-tidyverse","contributors-categories-curiousfrm-com"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Pricing Floating Legs of Interest Rate Swaps with R<\/title>\n<meta name=\"description\" content=\"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/11145\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pricing Floating Legs of Interest Rate Swaps with R | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-22T13:53:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-07T20:10:39+00:00\" \/>\n<meta name=\"author\" content=\"Davide Magno\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Davide Magno\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Davide Magno\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/5dee9eb1d0d0933b55de5ad7ca31afd4\"\n\t            },\n\t            \"headline\": \"Pricing Floating Legs of Interest Rate Swaps with R\",\n\t            \"datePublished\": \"2019-07-22T13:53:33+00:00\",\n\t            \"dateModified\": \"2025-02-07T20:10:39+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/\"\n\t            },\n\t            \"wordCount\": 569,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"CalculateAccrual\",\n\t                \"Data Science\",\n\t                \"EURIBOR\",\n\t                \"Lubridate\",\n\t                \"PURR\",\n\t                \"R\",\n\t                \"RQuantLib\",\n\t                \"tidyverse\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant Europe\",\n\t                \"Quant Regions\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/\",\n\t            \"name\": \"Pricing Floating Legs of Interest Rate Swaps with R | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"datePublished\": \"2019-07-22T13:53:33+00:00\",\n\t            \"dateModified\": \"2025-02-07T20:10:39+00:00\",\n\t            \"description\": \"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pricing-floating-legs-of-interest-rate-swaps-with-r\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/5dee9eb1d0d0933b55de5ad7ca31afd4\",\n\t            \"name\": \"Davide Magno\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/davide-magno\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pricing Floating Legs of Interest Rate Swaps with R","description":"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/11145\/","og_locale":"en_US","og_type":"article","og_title":"Pricing Floating Legs of Interest Rate Swaps with R | IBKR Quant Blog","og_description":"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/","og_site_name":"IBKR Campus US","article_published_time":"2019-07-22T13:53:33+00:00","article_modified_time":"2025-02-07T20:10:39+00:00","author":"Davide Magno","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Davide Magno","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/"},"author":{"name":"Davide Magno","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/5dee9eb1d0d0933b55de5ad7ca31afd4"},"headline":"Pricing Floating Legs of Interest Rate Swaps with R","datePublished":"2019-07-22T13:53:33+00:00","dateModified":"2025-02-07T20:10:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/"},"wordCount":569,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"keywords":["Algo Trading","CalculateAccrual","Data Science","EURIBOR","Lubridate","PURR","R","RQuantLib","tidyverse"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","Quant Europe","Quant Regions","R Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/","name":"Pricing Floating Legs of Interest Rate Swaps with R | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"datePublished":"2019-07-22T13:53:33+00:00","dateModified":"2025-02-07T20:10:39+00:00","description":"Davide Magno uses R for pricing of floating legs of interest rate swaps and calculates the accrual for the floating leg with historical data.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-floating-legs-of-interest-rate-swaps-with-r\/"]}]},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/5dee9eb1d0d0933b55de5ad7ca31afd4","name":"Davide Magno","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/davide-magno\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/11145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=11145"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/11145\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=11145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=11145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=11145"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=11145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}