{"id":219375,"date":"2025-03-05T09:31:34","date_gmt":"2025-03-05T14:31:34","guid":{"rendered":"https:\/\/ibkrcampus.com\/campus\/?p=219375"},"modified":"2025-04-17T16:41:46","modified_gmt":"2025-04-17T20:41:46","slug":"pricing-of-fx-forward-in-r-and-excel","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/","title":{"rendered":"Pricing of FX Forward in R and Excel"},"content":{"rendered":"\n<p><em>The article &#8220;Pricing of FX Forward in R and Excel&#8221; was originally posted on <a href=\"https:\/\/shleeai.blogspot.com\/2021\/08\/pricing-of-fx-forward-in-r-and-excel.html\">SHLee AI Financial Model<\/a><\/em>.<\/p>\n\n\n\n<p>This post explains how to price an FX forward. We assume that 1)\u00a0<strong>USD<\/strong>\u00a0is the\u00a0<strong>foreign<\/strong>\u00a0currency and\u00a0<strong>KRW<\/strong>\u00a0the\u00a0<strong>domestic<\/strong>\u00a0one, 2)\u00a0<strong>USD IRS zero curve<\/strong>\u00a0and\u00a0<strong>KRW FX implied zero curve<\/strong>\u00a0are given. Before making a R code, we use Excel spreadsheet for the clear understanding of the calculation process.<\/p>\n\n\n\n<p>In this post, we consider two solutions using Excel and R. In particular, Excel solution uses the same linear interpolation as that of the following post.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/shleeai.blogspot.com\/2021\/08\/simple-linear-interpolation-without-vba.html\" target=\"_blank\" rel=\"noreferrer noopener\">Simple Linear Interpolation without VBA Macro in Excel<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong>FX Forward Pricing<\/strong><\/p>\n\n\n\n<p>FX forward is a contractual agreement between two parties to exchange a pair of currencies at a specific time in the future. Given discount factors for domestic and foreign currencies, FX forward price is easily calculated. For example, let&#8217;s take an example of the USD KRW FX forward contract as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"722\" height=\"591\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/FX_foward_pricing_diagram.png\" alt=\"\" class=\"wp-image-219407 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/FX_foward_pricing_diagram.png 722w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/FX_foward_pricing_diagram-700x573.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/FX_foward_pricing_diagram-300x246.png 300w\" data-sizes=\"(max-width: 722px) 100vw, 722px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 722px; aspect-ratio: 722\/591;\" \/><\/figure>\n\n\n\n<p>The difference between present values of two nominal amount is the price of FX forward. Of course, it can be represented by either domestic or foreign currencies.<\/p>\n\n\n\n<p><strong>Example Trade<\/strong><\/p>\n\n\n\n<p>As of 2021\/06\/30, let&#8217;s investigate the calculation process of FX forward contract of the detailed example above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"971\" height=\"382\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/trade_info-shlee.png\" alt=\"\" class=\"wp-image-219410 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/trade_info-shlee.png 971w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/trade_info-shlee-700x275.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/trade_info-shlee-300x118.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/trade_info-shlee-768x302.png 768w\" data-sizes=\"(max-width: 971px) 100vw, 971px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 971px; aspect-ratio: 971\/382;\" \/><\/figure>\n\n\n\n<p><strong>Understanding using Excel<\/strong><\/p>\n\n\n\n<p>We need the each currency&#8217;s discount factor of maturity date, which is needed to be interpolated. We use the&nbsp;<strong>LINEST<\/strong>&nbsp;Excel function for this purpose. This interpolation procedure is simple and useful in that we only generate regression coefficients for the corresponding maturity ranges. From Excel spreadsheet calculation, we can learn how to price a FX forward. The important thing is to&nbsp;<strong>calculate present values of each nominal amounts using each discount factor and get their difference under the same currency.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"969\" height=\"710\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/Fx_Forward_Calculation-shlee.png\" alt=\"Pricing of FX Forward in R and Excel\" class=\"wp-image-219412 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/Fx_Forward_Calculation-shlee.png 969w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/Fx_Forward_Calculation-shlee-700x513.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/Fx_Forward_Calculation-shlee-300x220.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2025\/03\/Fx_Forward_Calculation-shlee-768x563.png 768w\" data-sizes=\"(max-width: 969px) 100vw, 969px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 969px; aspect-ratio: 969\/710;\" \/><\/figure>\n\n\n\n<p>Here, notations used in the above Excel spreadsheet are defined in the following way.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Zero(T) : zero rate at maturity<\/li>\n\n\n\n<li>DF(T) : discount factor at maturity<\/li>\n\n\n\n<li>FA : notional amount of foreign currency<\/li>\n\n\n\n<li>DA : notional amount of domestic currency<\/li>\n\n\n\n<li>PV(FA) in F : present value of FA denominated in Foreign currency<\/li>\n\n\n\n<li>PV(DA) in D : present value of DA denominated in Domestic currency<\/li>\n\n\n\n<li>PV(FA) in D : present value of FA denominated in Domestic currency<\/li>\n\n\n\n<li>PV(DA) in F : present value of DA denominated in Foreign currency<\/li>\n\n\n\n<li>Price in D : KRW (domestic currency) price of FX forward<\/li>\n\n\n\n<li>Price in F : USD (foreign currency) price of FX forward<\/li>\n<\/ul>\n\n\n\n<p><strong>R code<\/strong><\/p>\n\n\n\n<p>We can use R code to get the same results from Excel calculation.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#=========================================================================#\n# Financial Econometrics &amp; Derivatives, ML\/DL using R, Python, Tensorflow  \n# by Sang-Heon Lee \n#\n# https:\/\/shleeai.blogspot.com\n#-------------------------------------------------------------------------#\n# FX Forward Pricing\n#=========================================================================#\n \ngraphics.off()  # clear all graphs\nrm(list = ls()) # remove all files from your workspace\n \n#--------------------------------------------------------------------------\n# 1. Market Information\n#--------------------------------------------------------------------------\n    \n    #--------------------------------\n    # Zero curves as of 2021-06-30\n    #--------------------------------\n    lt.mt &lt;- list(\n        spot_date = 44377,   # spot date\n        \n        KRWUSD.FX.Spot = 1129.945, # FX Spot Rate\n        \n        KRW_CRS.zero = data.frame(\n            \n            # Excel numeric date\n            date = c(44378, 44379, 44386, 44410, \n                     44441, 44474, 44564, 44747), \n            rate = c(0.00629994563073550,\n                     0.00629994563073550,\n                     0.00463177425055339,\n                     0.00329405202619836,\n                     0.00292249195639071,\n                     0.00273429173667466,\n                     0.00331796879551685,\n                     0.00397939937284654)\n        ),\n        \n        USD_IRS.zero  = data.frame(\n            \n            # Excel numeric date\n            date = c(44378, 44386, 44410, 44441,\n                     44473, 44564, 44655, 44747), \n            rate = c(0.000842844860217754,\n                     0.000908701294845472,\n                     0.001006361388394810,\n                     0.001238311778397180,\n                     0.001455778457003310,\n                     0.001533135923937390,\n                     0.001716219715472820,\n                     0.001848263900368730)\n        )\n    )\n    \n    #--------------------------------\n    # Interpolation of zero curve\n    #--------------------------------\n \n    # USD IRS\n    v.date   &lt;- lt.mt$USD_IRS.zero$date\n    v.zero   &lt;- lt.mt$USD_IRS.zero$rate\n    func_linear_USD_IRS.zero &lt;- approxfun(v.date, v.zero, \n                                          method=\"linear\")\n    # KRW CRS\n    v.date   &lt;- lt.mt$KRW_CRS.zero$date\n    v.zero   &lt;- lt.mt$KRW_CRS.zero$rate\n    func_linear_KRW_CRS.zero &lt;- approxfun(v.date, v.zero, \n                                          method=\"linear\")\n#--------------------------------------------------------------------------\n# 2. FX Forward Trade Information\n#--------------------------------------------------------------------------\n \n    fAmt &lt;- 10000      # Foreign notional amount\n    dAmt &lt;- 10948600   # Domestic notional amount\n    fPosition &lt;- 1     # 1 if Foreign is a buy position, -1 if sell\n    mat_date  &lt;- 44561 # maturity date of FX Forward contract\n \n#--------------------------------------------------------------------------\n# 3. FX Forward Pricing\n#--------------------------------------------------------------------------\n    \n    #--------------------------------\n    # 1) Foreign\n    #--------------------------------\n    \n    # zero rate for discounting\n    fzero &lt;- func_linear_USD_IRS.zero(mat_date)\n    # discount factor\n    fDF &lt;- exp(-fzero*(mat_date-lt.mt$spot_date)\/365)\n    # discounted foreign amount denominated in foreign currency\n    pv_fAmt_in_f &lt;- fAmt*fDF\n    # discounted foreign amount denominated in domestic currency\n    pv_fAmt_in_d &lt;- pv_fAmt_in_f*lt.mt$KRWUSD.FX.Spot\n    \n    #--------------------------------\n    # 2) Domestic\n    #--------------------------------\n    \n    # zero rate for discounting\n    dzero &lt;- func_linear_KRW_CRS.zero(mat_date)\n    # discount factor\n    dDF &lt;- exp(-dzero*(mat_date-lt.mt$spot_date)\/365)\n    # discounted domestic amount denominated in foreign currency\n    pv_dAmt_in_d &lt;- dAmt*dDF\n    # discounted domestic amount denominated in domestic currency\n    pv_dAmt_in_f &lt;- pv_dAmt_in_d\/lt.mt$KRWUSD.FX.Spot\n    \n    # 3) Price\n    #--------------------------------\n    price_in_f &lt;- fPosition*(pv_fAmt_in_f - pv_dAmt_in_f)\n    price_in_d &lt;- fPosition*(pv_fAmt_in_d - pv_dAmt_in_d)\n    \n    print(paste0(\"FX Forward Price ($) = \", round(price_in_f,2)))\n    print(paste0(\"FX Forward Price (w) = \", round(price_in_d,2)))<\/pre>\n\n\n\n<p><strong>Results<\/strong><\/p>\n\n\n\n<p>The following results show FX forward prices which are denominated in both USD dollar and KRW won respectively. The price of this example is&nbsp;<strong>$318.89<\/strong>&nbsp;or&nbsp;<strong>\u20a9360,325.24<\/strong>. These result is the same as those obtained by using Excel.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">>     print(paste0(\"FX Forward Price ($) = \", round(price_in_f,2)))\n[1] \"FX Forward Price ($) = 318.89\"\n>     print(paste0(\"FX Forward Price (w) = \", round(price_in_d,2)))\n[1] \"FX Forward Price (w) = 360325.24\"<\/pre>\n\n\n\n<p>From this post, we can calculate the price of FX forward using Excel and R. For simplicity, FX implied zero curve is assumed away in this work, we will discuss it later.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post explains how to price an FX forward.<\/p>\n","protected":false},"author":662,"featured_media":99160,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,338,341,342],"tags":[806,5878,18608,487],"contributors-categories":[13728],"class_list":{"0":"post-219375","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-ibkr-quant-news","10":"category-quant-development","11":"category-r-development","12":"tag-data-science","13":"tag-excel","14":"tag-fx-forward","15":"tag-r","16":"contributors-categories-sh-fintech-modeling"},"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 v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Pricing of FX Forward in R and Excel | IBKR Quant<\/title>\n<meta name=\"description\" content=\"This post explains how to price an FX forward.\" \/>\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\/219375\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pricing of FX Forward in R and Excel\" \/>\n<meta property=\"og:description\" content=\"This post explains how to price an FX forward.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-05T14:31:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-17T20:41:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sang-Heon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sang-Heon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 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:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"Pricing of FX Forward in R and Excel\",\n\t            \"datePublished\": \"2025-03-05T14:31:34+00:00\",\n\t            \"dateModified\": \"2025-04-17T20:41:46+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/\"\n\t            },\n\t            \"wordCount\": 494,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/TA-forex.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"Excel\",\n\t                \"FX forward\",\n\t                \"R\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/\",\n\t            \"name\": \"Pricing of FX Forward in R and Excel | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/TA-forex.jpg\",\n\t            \"datePublished\": \"2025-03-05T14:31:34+00:00\",\n\t            \"dateModified\": \"2025-04-17T20:41:46+00:00\",\n\t            \"description\": \"This post explains how to price an FX forward.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/pricing-of-fx-forward-in-r-and-excel\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/TA-forex.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/TA-forex.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563\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\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pricing of FX Forward in R and Excel | IBKR Quant","description":"This post explains how to price an FX forward.","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\/219375\/","og_locale":"en_US","og_type":"article","og_title":"Pricing of FX Forward in R and Excel","og_description":"This post explains how to price an FX forward.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/","og_site_name":"IBKR Campus US","article_published_time":"2025-03-05T14:31:34+00:00","article_modified_time":"2025-04-17T20:41:46+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","type":"image\/jpeg"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"Pricing of FX Forward in R and Excel","datePublished":"2025-03-05T14:31:34+00:00","dateModified":"2025-04-17T20:41:46+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/"},"wordCount":494,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","keywords":["Data Science","Excel","FX forward","R"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","R Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/","name":"Pricing of FX Forward in R and Excel | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","datePublished":"2025-03-05T14:31:34+00:00","dateModified":"2025-04-17T20:41:46+00:00","description":"This post explains how to price an FX forward.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/pricing-of-fx-forward-in-r-and-excel\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","width":1000,"height":563},{"@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\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/TA-forex.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/219375","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\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=219375"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/219375\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/99160"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=219375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=219375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=219375"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=219375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}