{"id":7566,"date":"2023-11-13T16:00:17","date_gmt":"2023-11-13T16:00:17","guid":{"rendered":"https:\/\/ibkrcampus.eu\/uncategorized\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/"},"modified":"2024-01-11T16:31:18","modified_gmt":"2024-01-11T16:31:18","slug":"r-apply-particle-swarm-optimization-to-the-nelson-siegel-model","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/","title":{"rendered":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model"},"content":{"rendered":"\n<p>This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using&nbsp;<strong>pso<\/strong>&nbsp;R package.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"h-particle-swarm-optimization-pso\">Particle Swarm Optimization (PSO)<\/h1>\n\n\n\n<p>PSO is a population-based optimization algorithm that mimics the collective behavior of birds or fish. It operates with a group of particles, each representing a possible solution to an optimization problem. These particles move through a solution space, continuously adjusting their positions and velocities. Each particle keeps track of its personal best solution and learns from the global best solution found by any particle in the population.<\/p>\n\n\n\n<p>By balancing personal experience and global knowledge, PSO efficiently explores the solution space, gradually converging towards an optimal solution. The algorithm&#8217;s performance relies on relevant parameters like the number of particles, maximum velocity, and learning factors.<\/p>\n\n\n\n<p>As with most topics, there is a wealth of extensive and valuable information about PSO available on Google, and this post does not duplicate it. Instead, I focus on applying the&nbsp;<strong>psoptim()<\/strong>&nbsp;function from the R package&nbsp;<strong>pso<\/strong>&nbsp;to solve practical problems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-r-code\">R code<\/h3>\n\n\n\n<p>The following R code estimates the Nelson-Siegel parameters by using the PSO.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#========================================================#\n# Quantitative Financial Econometrics &amp; Derivatives \n# ML\/DL using R, Python, Tensorflow by Sang-Heon Lee \n#\n# https:\/\/shleeai.blogspot.com\n#--------------------------------------------------------#\n# Estimating the Nelson-Siegel model \n# using Particle Swarm Optimizer (PSO)\n#========================================================#\n \ngraphics.off(); rm(list = ls())\nlibrary(pso) # psoptim\n    \n#-----------------------------------------------\n# Objective function\n#-----------------------------------------------\n    objfunc &lt;- function(para, y, m) {\n        beta &lt;- para[1:3]; la &lt;- para[4]\n        C  &lt;- cbind(rep(1,length(m)),    \n            (1-exp(-la*m))\/(la*m),             \n            (1-exp(-la*m))\/(la*m)-exp(-la*m))\n        return(sum((y - C%*%beta)^2))\n    }\n    \n#=======================================================\n# 1. Read data\n#=======================================================\n    \n    # b1, b2, b3, lambda for comparisons\n    ns_reg_para_rmse1 &lt;- c(\n        4.26219396, -4.08609206, -4.90893865,  \n        0.02722607,  0.04883786)\n    ns_reg_para_rmse2 &lt;- c(\n        4.97628654, -4.75365297, -6.40263059,  \n        0.05046789,  0.04157326)\n    \n    str.zero &lt;- \"\n        mat     rate1      rate2\n        3       0.0781     0.0591\n        6       0.1192     0.0931\n        9       0.1579     0.1270\n        12      0.1893     0.1654\n        24      0.2669     0.3919\n        36      0.3831     0.8192\n        48      0.5489     1.3242\n        60      0.7371     1.7623\n        72      0.9523     2.1495\n        84      1.1936     2.4994\n        96      1.4275     2.7740\n        108     1.6424     2.9798\n        120     1.8326     3.1662\n        144     2.1715     3.4829\n        180     2.5489     3.7827\n        240     2.8093     3.9696\"\n    \n    df &lt;- read.table(text = str.zero, header=TRUE)\n    m  &lt;- df$mat\n    y1 &lt;- df$rate1; y2 &lt;- df$rate2\n \n#==============================================================\n# 2. Particle Swarm Optimizer \n#  : PSO Optimization with constraints\n#==============================================================\n    \n    # NS estimation with 1st data\n    y &lt;- y1\n    x_init &lt;- c(y[16], y[1]-y[16], \n                2*y[6]-y[1]-y[16], 0.0609)\n    \n    set.seed(90)\n    psopt&lt;-psoptim(x_init, fn = objfunc,\n                   lower = c(0, -20, -20, 0.015),\n                   upper = c(20, 20,  20, 0.075),\n                   y = y, m = m)\n    \n    nsptim_out1 &lt;- c(psopt$par, sqrt(psopt$value\/length(m)))\n    \n    # NS estimation with 2nd data\n    y &lt;- y2\n    x_init &lt;- c(y[16], y[1]-y[16], \n                2*y[6]-y[1]-y[16], 0.0609)\n    \n    set.seed(90)\n    psopt &lt;- psoptim(x_init, fn = objfunc, y = y, m = m,\n         lower = c(0, -20, -20, 0.015),\n         upper = c(20, 20,  20, 0.075),\n         control = list(trace=1, REPORT=50,\n             reltol=1e-4, abstol=1e-8,\n             hybrid=TRUE, hybrid.control=list(maxit=10)))\n    \n    nsptim_out2 &lt;- c(psopt$par, sqrt(psopt$value\/length(m)))\n    \n#=======================================================\n# 3. Results and Comparisons\n#=======================================================\n    \n    ns_reg_para_rmse1\n    nsptim_out1\n    \n    ns_reg_para_rmse2\n    nsptim_out2\n    \n<\/pre>\n\n\n\n<p>As can be seen in the following results, these simple examples yield the same outcomes with the given estimates.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"713\" height=\"423\" data-src=\"https:\/\/ibkrcampusdev.wpengine.com\/wp-content\/uploads\/sites\/3\/2023\/11\/pos_ns_output-shleeai.png\" alt=\"\" class=\"wp-image-7568 lazyload\" data-srcset=\"https:\/\/ibkrcampus.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/pos_ns_output-shleeai.png 713w, https:\/\/ibkrcampus.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/pos_ns_output-shleeai-700x415.png 700w, https:\/\/ibkrcampus.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/pos_ns_output-shleeai-300x178.png 300w\" data-sizes=\"(max-width: 713px) 100vw, 713px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 713px; aspect-ratio: 713\/423;\" \/><\/figure>\n\n\n\n<p>Some research has applied hybrid particle swarm optimization and achieved promising results in financial applications such as asset allocation and yield curve fitting, among others, indicating the need for further exploration and investigation. Therefore, this post serves as a small step and starting point for guiding its usage.&nbsp;<\/p>\n\n\n\n<p><em>Originally posted on <a href=\"https:\/\/shleeai.blogspot.com\/2023\/08\/r-apply-particle-swarm-optimization-to.html\">SHLee AI Financial Model<\/a> blog.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.<\/p>\n","protected":false},"author":662,"featured_media":7569,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[28,32,27,30,31,148,7],"tags":[278,279,280,281,282,283],"contributors-categories":[284],"class_list":{"0":"post-7566","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":"category-text-articles","13":"category-traders-insight","14":"tag-data-science","15":"tag-econometrics","16":"tag-nelson-siegel-model","17":"tag-particle-swarm-optimization","18":"tag-pso-r-package","19":"tag-r","20":"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.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>R: Apply Particle Swarm Optimization to the Nelson-Siegel Model<\/title>\n<meta name=\"description\" content=\"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.\" \/>\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\/7566\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model\" \/>\n<meta property=\"og:description\" content=\"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus EU\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-13T16:00:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-11T16:31:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.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=\"2 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\": \"Article\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model\",\n\t            \"datePublished\": \"2023-11-13T16:00:17+00:00\",\n\t            \"dateModified\": \"2024-01-11T16:31:18+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/\"\n\t            },\n\t            \"wordCount\": 275,\n\t            \"commentCount\": 0,\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2023\\\/11\\\/r-programming-keyboard.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"Econometrics\",\n\t                \"Nelson-Siegel Model\",\n\t                \"Particle Swarm Optimization\",\n\t                \"pso R package\",\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                \"Text Articles\",\n\t                \"Traders' Insight\"\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:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/\",\n\t            \"name\": \"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model - IBKR Campus EU\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2023\\\/11\\\/r-programming-keyboard.jpg\",\n\t            \"datePublished\": \"2023-11-13T16:00:17+00:00\",\n\t            \"dateModified\": \"2024-01-11T16:31:18+00:00\",\n\t            \"author\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"description\": \"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.\",\n\t            \"breadcrumb\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#breadcrumb\"\n\t            },\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2023\\\/11\\\/r-programming-keyboard.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2023\\\/11\\\/r-programming-keyboard.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"R Programming\"\n\t        },\n\t        {\n\t            \"@type\": \"BreadcrumbList\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/ibkr-quant-news\\\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\\\/#breadcrumb\",\n\t            \"itemListElement\": [\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 1,\n\t                    \"name\": \"Home\",\n\t                    \"item\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/\"\n\t                },\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 2,\n\t                    \"name\": \"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model\"\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus EU\",\n\t            \"description\": \"\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.eu\\\/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\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.eu\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.eu\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model","description":"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.","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\/7566\/","og_locale":"en_US","og_type":"article","og_title":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model","og_description":"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.","og_url":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/","og_site_name":"IBKR Campus EU","article_published_time":"2023-11-13T16:00:17+00:00","article_modified_time":"2024-01-11T16:31:18+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","type":"image\/jpeg"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.eu\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model","datePublished":"2023-11-13T16:00:17+00:00","dateModified":"2024-01-11T16:31:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/"},"wordCount":275,"commentCount":0,"image":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","keywords":["Data Science","Econometrics","Nelson-Siegel Model","Particle Swarm Optimization","pso R package","R"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","R Development","Text Articles","Traders' Insight"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/","url":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/","name":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model - IBKR Campus EU","isPartOf":{"@id":"https:\/\/ibkrcampus.eu\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","datePublished":"2023-11-13T16:00:17+00:00","dateModified":"2024-01-11T16:31:18+00:00","author":{"@id":"https:\/\/ibkrcampus.eu\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"description":"This post shows how to apply the Particle Swarm Optimization (PSO) to estimate the Nelson-Siegel parameters using pso R package.","breadcrumb":{"@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#primaryimage","url":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","contentUrl":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","width":1000,"height":563,"caption":"R Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/www.interactivebrokers.eu\/campus\/ibkr-quant-news\/r-apply-particle-swarm-optimization-to-the-nelson-siegel-model\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.interactivebrokers.eu\/campus\/"},{"@type":"ListItem","position":2,"name":"R: Apply Particle Swarm Optimization to the Nelson-Siegel Model"}]},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.eu\/campus\/#website","url":"https:\/\/ibkrcampus.eu\/campus\/","name":"IBKR Campus EU","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.eu\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ibkrcampus.eu\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.eu\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.eu\/campus\/wp-content\/uploads\/sites\/3\/2023\/11\/r-programming-keyboard.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/posts\/7566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/comments?post=7566"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/posts\/7566\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/media\/7569"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/media?parent=7566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/categories?post=7566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/tags?post=7566"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.eu\/campus\/wp-json\/wp\/v2\/contributors-categories?post=7566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}