{"id":2371,"date":"2022-03-01T03:02:26","date_gmt":"2022-03-01T03:02:26","guid":{"rendered":"https:\/\/www.tejwin.com\/en\/insights\/portfolio-var\/"},"modified":"2022-03-01T03:02:26","modified_gmt":"2022-03-01T03:02:26","slug":"portfolio-var","status":"publish","type":"insight","link":"https:\/\/www.tejwin.com\/en\/insights\/portfolio-var\/","title":{"rendered":"Portfolio VaR"},"content":{"rendered":"<figure class=\"wp-block-image\" id=\"d395\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1kcgdlmbz6RSfbvQqlAisCg-2.jpeg\"\/><figcaption class=\"wp-element-caption\">Photo by <a class=\"markup--anchor markup--figure-anchor\" data-=\"\" data-href=\"https:\/\/unsplash.com\/@homajob\" href=\"https:\/\/unsplash.com\/@homajob\" rel=\"noopener\" target=\"_blank\">Scott Graham<\/a> on\u00a0<a class=\"markup--anchor markup--figure-anchor\" data-=\"\" data-href=\"https:\/\/unsplash.com\" href=\"https:\/\/unsplash.com\" rel=\"noopener\" target=\"_blank\">Unsplash<\/a><\/figcaption><\/figure>\n<h2 class=\"wp-block-heading\" id=\"b9a9\">Highlights<\/h2>\n<ul class=\"wp-block-list\">\n<li>Difficulty\uff1a\u2605\u2605\u2606\u2606\u2606<\/li>\n<li>Portfolio VaR calculation &amp; analysis<\/li>\n<li>Reminder: We would apply Python to calculate VaR by variance-covariance method. Therefore, it would be better for you to understand fundamentals of portfolio and Statistics.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"1c23\">Preface<\/h2>\n<p class=\"wp-block-paragraph\" id=\"e33c\">Value at risk, VaR, means the maximum loss of a portfolio by determined confidence level and data of specific period.<\/p>\n<p class=\"wp-block-paragraph\" id=\"5b7f\">The procedure of calculation is as follow:<\/p>\n<ol class=\"wp-block-list\">\n<li>Daily Earnings at Risk<\/li>\n<li>Correlation coefficient between stocks<\/li>\n<li>VaR of portfolio<\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\" id=\"5a6f\">During computing, we should notice every parameter setting and distribution of stock return so as to reflect market\u2019s volatility on the numbers. Subsequently, we would carefully implement the process and illustrate the defect of variance-covariance method.<\/p>\n<p class=\"wp-block-paragraph\" id=\"8c07\">VaR terms applied in this article:<\/p>\n<ol class=\"wp-block-list\">\n<li>Daily Earning at Risk, DEAR\uff1aThe potential loss of a portfolio\u2019s value in single day.<\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\" id=\"364d\">2. Relative VaR\uff1aThe VaR compared to average return of portfolio.<\/p>\n<p class=\"wp-block-paragraph\" id=\"eca4\">(|-\u03b1| * \u03c3) * portfolio value<\/p>\n<p class=\"wp-block-paragraph\" id=\"a7dc\">3. Absolute VaR\uff1aThe VaR compared to 0.<\/p>\n<p class=\"wp-block-paragraph\" id=\"f1a1\">(|-\u03b1| * \u03c3 \u2014 mean) * portfolio value<\/p>\n<p class=\"wp-block-paragraph\" id=\"9225\">Above \u03b1 is the critical value of normal distribution. We would apply the the most restrict standard, 99% confidence level and Z-value equal to 2.33 to compute.<\/p>\n<h2 class=\"wp-block-heading\" id=\"6222\">Editing Environment and Modules Required<\/h2>\n<p class=\"wp-block-paragraph\" id=\"4814\">MacOS &amp; Jupyter Notebook<\/p>\n<pre class=\"wp-block-preformatted\" id=\"c1ef\"><code>\uff03\u57fa\u672c\u5957\u4ef6<\/code> <code>import numpy as np<\/code> <code>import pandas as pd<\/code> <code>\uff03\u7e6a\u5716\u5957\u4ef6<\/code> <code>import matplotlib.pyplot as plt<\/code> <code>%matplotlib inline<\/code> <code>import seaborn as sns<\/code> <code>sns.set()<\/code> <code>\uff03TEJAPI<\/code> <code>import tejapi<\/code> <code>tejapi.ApiConfig.api_key = 'Your Key'<\/code> <code>tejapi.ApiConfig.ignoretz = True<\/code><\/pre>\n<h2 class=\"wp-block-heading\" id=\"2173\">Database<\/h2>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_case_detail\/2?item_id=TWN\/EWPRCD\" rel=\"noreferrer noopener\" target=\"_blank\">Security Transaction Data Table<\/a>: Listed securities with adjusted and unadjusted price and index. Code is \u2018TWN\/EWPRCD\u2019.<\/li>\n<li><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_case_detail\/2?item_id=TWN\/EWPRCD2\" rel=\"noreferrer noopener\" target=\"_blank\">Security Return Data Table<\/a>: Listed securities with different period basis return. Code is \u2018TWN\/EWPRCD2\u2019.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"e492\">Data Selection &amp; Pre-processing<\/h2>\n<p class=\"wp-block-paragraph\" id=\"d2f2\"><strong>Step 1. Stock Price<\/strong><\/p>\n<p class=\"wp-block-paragraph\" id=\"2397\">The portfolio would consist of traditional , high-tech, finance and shipping corporation. We would calculate VaR and display the distribution of every stock. By combining above parts, we would make you understand the pro-and-con of Variance-Covariance VaR.<\/p>\n<pre class=\"wp-block-preformatted\" id=\"7b91\"><code>ticker = ['1476', '2330', '2882', '2603']<\/code> <code># \u5112\u9d3b, \u53f0\u7a4d\u96fb, \u570b\u6cf0\u91d1, \u9577\u69ae<\/code> <code>df = tejapi.get('TWN\/EWPRCD', # \u516c\u53f8\u4ea4\u6613\u8cc7\u6599-\u5df2\u8abf\u6574\u80a1\u50f9(\u6536\u76e4\u50f9)<\/code> <code>                coid = ticker,<\/code> <code>                mdate = {'gte':'20200101', 'lte':'20220225'},<\/code> <code>                opts = {'columns': ['coid', 'mdate', 'close_adj']},<\/code> <code>                chinese_column_name = True,<\/code> <code>                paginate = True)<\/code> <code>df = df.set_index('\u65e5\u671f')<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"d1ec\"><\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u4e00)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1ilxo9-CF2PGS5lVlj1iPeg-2.png\"\/><\/figure>\n<h4 class=\"wp-block-heading\" id=\"ffc3\"><strong class=\"markup--strong markup--p-strong\"><strong>Step 2. Transpose Price Data<\/strong><\/strong><\/h4>\n<pre class=\"wp-block-preformatted\" id=\"dc20\"><code>data = {}<\/code> <code>for i in ticker:<\/code> <code>    p = df[df['\u8b49\u5238\u4ee3\u78bc'] == i]<\/code> <code>    p = p['\u6536\u76e4\u50f9(\u5143)']<\/code> <code>    data.setdefault(i, p)<\/code> <code>data = pd.concat(data, axis = 1)<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"5e05\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u4e8c)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1iakvdbaiAaJ-PI5xqIDrIQ-2.png\"\/><\/figure>\n<p class=\"wp-block-paragraph\" id=\"d1c5\"><strong>Step 3. Daily Return<\/strong><\/p>\n<p class=\"wp-block-paragraph\" id=\"b52b\">Apply\u00a0<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_case_detail\/2?item_id=TWN\/EWPRCD2\" rel=\"noreferrer noopener\" target=\"_blank\">Security Return Data Table<\/a>\u00a0to ensure the source quality. Pre-processing of return data is the same as that of price.<\/p>\n<pre class=\"wp-block-preformatted\" id=\"f557\"><code>ret = tejapi.get('TWN\/EWPRCD2', <\/code> <code>                  coid = ticker,<\/code> <code>                  mdate = {'gte':'20200101', 'lte':'20220225'},<\/code> <code>                  opts = {'columns': ['coid', 'mdate', 'roia']},<\/code> <code>                  chinese_column_name = True,<\/code> <code>                  paginate = True)<\/code> <code>ret = ret.set_index('\u65e5\u671f')<\/code> <code>data2 = {}<\/code> <code>for i in ticker:<\/code> <code>    r = ret[ret['\u8b49\u5238\u78bc'] == i]<\/code> <code>    r = r['\u65e5\u5831\u916c\u7387(%)']<\/code> <code>    data2.setdefault(i, r)<\/code> <code>data2 = pd.concat(data2, axis = 1)<\/code> <code>data2 = data2 * 0.01 \uff03\u9084\u539f\u5831\u916c\u7387\u70ba\u767e\u5206\u4e4b\u4e00\u55ae\u4f4d\u57fa\u6e96<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"14f0\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u4e09)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/12N4LMiBiHDF-04AdbaBpYA-2.png\"\/><\/figure>\n<h2 class=\"wp-block-heading\" id=\"aeea\">Daily Return at Risk, DEAR<\/h2>\n<p class=\"wp-block-paragraph\" id=\"3556\"><strong>Step 1. Declare Empty Lists<\/strong><\/p>\n<pre class=\"wp-block-preformatted\" id=\"0021\"><code>value = data.iloc[-1] * 1000 <\/code> <code>Mean = []<\/code> <code>STD = []<\/code> <code>MAX = []<\/code> <code>Min = []<\/code> <code>abs_var = []<\/code> <code>re_var = []<\/code><\/pre>\n<p class=\"wp-block-paragraph\" id=\"d46b\">Firstly, we would calculate value of stocks in portfolio, assuming hold at least 1,000 share, which is the base unit in TAIEX. Subsequently, declare empty lists.<\/p>\n<p class=\"wp-block-paragraph\" id=\"38cb\"><strong>Step 2. Calculate DEAR, one-day VaR<\/strong><\/p>\n<pre class=\"wp-block-preformatted\" id=\"b27e\"><code>for i in ticker:<\/code> <code>    v = data2[i].std()              # Standard Error<\/code> <code>    mean = data2[i].mean()          # Mean <\/code> <code>    maximum = data2[i].max()        # Maximum<\/code> <code>    minimum = data2[i].min()        # Minimum<\/code> <code>    # Calculate 99% Absolute VaR<\/code> <code>    var_99_ab = (abs(-2.33)*v - mean) * value[i]   <\/code> <code>    # Calculate 99% Relative VaR<\/code> <code>    var_99_re = (abs(-2.33)*v) * value[i]        <\/code> <code>    # Append those values in lists<\/code> <code>    Mean.append(mean)<\/code> <code>    STD.append(v)<\/code> <code>    MAX.append(maximum)<\/code> <code>    Min.append(minimum)<\/code> <code>    abs_var.append(var_99_ab)<\/code> <code>    re_var.append(var_99_re)<\/code><\/pre>\n<p class=\"wp-block-paragraph\" id=\"db4a\">In the loop, we firstly calculate std, mean, maximum and minimum. Secondly, compute absolute and relative VaR. Lastly, return values to empty lists.<\/p>\n<p class=\"wp-block-paragraph\" id=\"16d2\">We apply abs() during calculation of VaR, which is for the remind of that VaR concerns the downside, namely the negative, so -2.33 is adequate. However, using positive number is the convention of presenting VaR; therefore, convert -2.33 to positive by abs().<\/p>\n<p class=\"wp-block-paragraph\" id=\"cfc5\"><strong>Step 3. Construct new Table<\/strong><\/p>\n<pre class=\"wp-block-preformatted\" id=\"6a1b\"><code>dear = pd.DataFrame({'Mean': Mean, 'STD': STD, 'Maximum': MAX, 'Minimum': Min, '99%\u7d55\u5c0dVaR': abs_var, '99%\u76f8\u5c0dVaR': re_var},<\/code> <code>index = ticker)<\/code> <code># \u76f4\u63a5\u5c07DEAR\u547d\u540d\u70ba\u7d55\u5c0d\u3001\u76f8\u5c0dVaR\uff0c\u4f9b\u5f8c\u7e8c\u8a08\u7b97\u4f7f\u7528<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"c95a\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u56db)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1zGQeiB5KsF6b20YYxtS59A-2.png\"\/><\/figure>\n<h2 class=\"wp-block-heading\" id=\"574f\">Correlation Coefficient<\/h2>\n<pre class=\"wp-block-code\" id=\"77a9\"><code>rho = data2.corr() # Apply ret to avoid spurious regression result<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"814c\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u4e94)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1UvfbDGlT_cbmrVk2C86RIg-2.png\"\/><\/figure>\n<p class=\"wp-block-paragraph\" id=\"5063\">Instead of price data, we apply return data to get the correlation coefficient among stocks. By doing so, we would avoid Spurious Regression and compute correct coefficient.<\/p>\n<h2 class=\"wp-block-heading\" id=\"9593\">Portfolio VaR<\/h2>\n<p class=\"wp-block-paragraph\" id=\"9afb\"><strong>Step 1. Concatenate Tables<\/strong><\/p>\n<pre class=\"wp-block-preformatted\" id=\"3b00\"><code>\uff03 \u5c07\u4e0d\u9700\u7528\u5230\u7684\u8cc7\u6599\u5254\u9664\u3002<\/code> <code>dear = dear.drop(columns = ['Mean', 'STD', 'Maximum', 'Minimum'])<\/code> <code># \u5408\u4f75 dear \u8207 rho<\/code> <code>portfolio = pd.concat([dear, rho,], axis = 1) <\/code> <code>portfolio[['99%\u7d55\u5c0dVaR', '99%\u76f8\u5c0dVaR']] = portfolio[['99%\u7d55\u5c0dVaR', '99%\u76f8\u5c0dVaR']]<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"e3e8\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u8868(\u516d)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1nbwuYcRU5ZKsdHxvImLUcA-2.png\"\/><figcaption class=\"wp-element-caption\">\u8868(\u516d)<\/figcaption><\/figure>\n<p class=\"wp-block-paragraph\" id=\"c14d\"><strong>Step 2. Calculate VaR<\/strong><\/p>\n<p class=\"wp-block-paragraph\" id=\"553f\">part1 is the proportion of VaR of stocks itself in portfolio. As for part2, it is the VaR with the adjustment of correlation coefficient among different stocks.<\/p>\n<pre class=\"wp-block-preformatted\" id=\"81ba\"><code>part1 = sum(portfolio['99%\u7d55\u5c0dVaR']**2)<\/code> <code>part2 = <\/code> <code>2*portfolio.iat[0,3] * portfolio.iat[0,0] * portfolio.iat[1,0] <\/code> <code>+ 2*portfolio.iat[0,4] * portfolio.iat[0,0] * portfolio.iat[2,0] <\/code> <code>+ 2*portfolio.iat[0,5] * portfolio.iat[0,0] * portfolio.iat[3,0] <\/code> <code>+ 2*portfolio.iat[1,4] * portfolio.iat[1,0] * portfolio.iat[2,0] <\/code> <code>+ 2*portfolio.iat[1,5] * portfolio.iat[1,0] * portfolio.iat[3,0] <\/code> <code>+ 2*portfolio.iat[2,5] * portfolio.iat[2,0] * portfolio.iat[3,0]<\/code><\/pre>\n<p class=\"wp-block-paragraph\" id=\"c621\">Absolute VaR at 99% confidence level is 50647.78.<\/p>\n<pre class=\"wp-block-preformatted\" id=\"8889\"><code>part1 = sum(portfolio['99%\u76f8\u5c0dVaR']**2)<\/code> <code>part2 = <\/code> <code>2*portfolio.iat[0,3] * portfolio.iat[0,1] * portfolio.iat[1,1] <\/code> <code>+ 2*portfolio.iat[0,4] * portfolio.iat[0,1] * portfolio.iat[2,1] <\/code> <code>+ 2*portfolio.iat[0,5] * portfolio.iat[0,1] * portfolio.iat[3,1] <\/code> <code>+ 2*portfolio.iat[1,4] * portfolio.iat[1,1] * portfolio.iat[2,1] <\/code> <code>+ 2*portfolio.iat[1,5] * portfolio.iat[1,1] * portfolio.iat[3,1] <\/code> <code>+ 2*portfolio.iat[2,5] * portfolio.iat[2,1] * portfolio.iat[3,1]<\/code><\/pre>\n<p class=\"wp-block-paragraph\" id=\"b635\">Relative VaR at 99% confidence level is 52205.86.<\/p>\n<p class=\"wp-block-paragraph\" id=\"4fa3\">According to above calculation, we conclude that\u00a0<strong>maximum loss of the portfolio in one day would not exceed 52 thousands at 99 percent chance<\/strong>. However, market always fluctuates. Hence, keeping the calculation of VaR regularly would make our judgement more accurately.<\/p>\n<h2 class=\"wp-block-heading\" id=\"a78d\">Defects of Variance-Covariance Method<\/h2>\n<ol class=\"wp-block-list\">\n<li>Unable to measure VaR of non-linear asset, like option. Since the structure of correlation coefficient has assumed that there is a linear relation among data, this method is not suitable for non-linear asset.<\/li>\n<li>Ignore fat-tail. we use critical value of normal distribution to calculate DEAR, which might make us underestimate VaR due to the fat-tail problem of security asset.<\/li>\n<\/ol>\n<p class=\"wp-block-paragraph\" id=\"4f54\">We would display distributions of stocks so as to check severity of fat-tail.<\/p>\n<pre class=\"wp-block-preformatted\" id=\"e0f4\"><code>plt.rcParams['font.sans-serif'] = ['Arial Unicode MS']<\/code> <code>fig, ax =plt.subplots(figsize = (18, 12), nrows = 2, ncols = 2)<\/code> <code>data2['1476'].plot.hist(ax=ax[0][0], bins = 100,range=(data2['1476'].min(), data2['1476'].max()),  label = '\u5112\u9d3b')<\/code> <code>ax[0][0].legend(loc = 2, fontsize = 30)<\/code> <code>data2['2330'].plot.hist(ax=ax[0][1], bins = 100,range=(data2['2330'].min(), data2['2330'].max()),  label = '\u53f0\u7a4d\u96fb')<\/code> <code>ax[0][1].legend(loc = 2, fontsize = 30)<\/code> <code>data2['2882'].plot.hist(ax=ax[1][0], bins = 100,range=(data2['2882'].min(), data2['2882'].max()),  label = '\u570b\u6cf0\u91d1')<\/code> <code>ax[1][0].legend(loc = 2, fontsize = 30)<\/code> <code>data2['2603'].plot.hist(ax=ax[1][1], bins = 100,range=(data2['2603'].min(), data2['2603'].max()),  label = '\u9577\u69ae')<\/code> <code>ax[1][1].legend(loc = 2, fontsize = 30)<\/code> <code>plt.tight_layout()<\/code><\/pre>\n<figure class=\"graf graf--figure graf-after--pre\" id=\"3bf8\">\n<\/figure>\n<figure class=\"wp-block-image aligncenter caption-align-center graf-image\"><img decoding=\"async\" alt=\"\u5716(\u4e00)\" src=\"https:\/\/www.tejwin.com\/en\/wp-content\/uploads\/2026\/08\/1CCQwmvFi1M5pfOv0YvbbFA-2.png\"\/><figcaption class=\"wp-element-caption\">\u5716(\u4e00)<\/figcaption><\/figure>\n<p class=\"wp-block-paragraph\" id=\"3a94\">Based on above charts, it is clear that EVERGREEN\u2019s fat-tail is the most apparent. TSMC and Eclat Textile have fat-tail but not that dramatic. As for Cathay Financial Holdings, there is almost no fat-tail.<\/p>\n<h1 class=\"wp-block-heading\" id=\"8b27\">Conclusion<\/h1>\n<p class=\"wp-block-paragraph\" id=\"26eb\">With the process of calculation and analysis in this article, believe you would understand the procedure of Variance-Covariance Method. Firstly, calculate DEAR. Subsequently, get the correlation coefficient. Lastly, compute VaR of the whole portfolio. It is for sure that there is some disadvantages of this method and you can understand that fat-tail problem exists in these stocks. As a result, if you are curious about the solution for fat-tail, pleaser keep tracking this platform. We, later, will post new article to demonstate. In the end, welcome to purchase the plans offered in\u00a0<a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/index\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>TEJ E Shop<\/strong><\/a>\u00a0to conduct VaR calculation for your own portfolio.<\/p>\n<h2 class=\"wp-block-heading\" id=\"8b93\">Source Code<\/h2>\n<ul class=\"wp-block-list\">\n<li><a class=\"ek-link\" href=\"https:\/\/gist.github.com\/tej87681088\/aac62e0db1e970e99b5e8fdfeaecd9e2#file-tejapi_medium-16-ipynb\" rel=\"noopener\" target=\"_blank\">Github<\/a><\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"601c\">Extended Reading<\/h2>\n<ul class=\"wp-block-list\">\n<li><a class=\"ek-link\" href=\"https:\/\/medium.com\/tej-api-financial-data-anlaysis\/application-12-money-management-3b264a59cfd0\" rel=\"noopener\" target=\"_blank\">\u3010Application(12)\u3011Money Management<\/a><\/li>\n<li><a class=\"ek-link\" href=\"https:\/\/medium.com\/tej-api-financial-data-anlaysis\/data-analysis-11-arima-garch-model-part-2-628e48d17b7d\" rel=\"noopener\" target=\"_blank\">\u3010Data Analysis(11)\u3011ARIMA-GARCH Model(Part 2)<\/a><\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"8fc2\">Related Link<\/h2>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/medium.com\/r?url=https%3A%2F%2Fapi.tej.com.tw%2Fdatatables.html%3Fdb%3DTWN%26t%3D%25E5%258F%25B0%25E7%2581%25A3%25E8%25B3%2587%25E6%2596%2599%25E5%25BA%25AB\" rel=\"noopener\" target=\"_blank\">TEJ API<\/a><\/li>\n<li><a href=\"https:\/\/eshop.tej.com.tw\/E-Shop\/Edata_intro\" rel=\"noreferrer noopener\" target=\"_blank\">TEJ E-Shop<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In 1997, Robert Merton and Myron Scholes won the Nobel Prize in Economics for their Black-Scholes options pricing formula, beating out many other contenders. The Black-Scholes model is still a widely-used option pricing model in the financial industry and by investors due to its excellent mathematical properties, simplicity, and ease of use. Today, we will focus on programming this model and Greeks derived from Black Scholes model.<\/p>\n","protected":false},"featured_media":2370,"template":"","tags":[50,70],"insight_category":[16],"class_list":["post-2371","insight","type-insight","status-publish","has-post-thumbnail","hentry","tag-market-data","tag-tej-api","insight_category-quant-data-science"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight\/2371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight"}],"about":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/types\/insight"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media\/2370"}],"wp:attachment":[{"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/media?parent=2371"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/tags?post=2371"},{"taxonomy":"insight_category","embeddable":true,"href":"https:\/\/www.tejwin.com\/en\/wp-json\/wp\/v2\/insight_category?post=2371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}