<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: calculate the value with the forward value in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67701#M19373</link>
    <description>excuse me,  i can not understand what you mean. &lt;BR /&gt;
could you explain the question in detail?&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: bqk

Message was edited by: bqk</description>
    <pubDate>Sat, 21 May 2011 19:05:19 GMT</pubDate>
    <dc:creator>bqk</dc:creator>
    <dc:date>2011-05-21T19:05:19Z</dc:date>
    <item>
      <title>calculate the value with the forward value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67699#M19371</link>
      <description>i want to do the following step:&lt;BR /&gt;
&lt;BR /&gt;
1. the shares holding is the delta&lt;BR /&gt;
&lt;BR /&gt;
2. the shares purchased is the latter value minus the forward value&lt;BR /&gt;
    for example: on the 2004/1/5 the shares purchased 0.015666=-0.0153-(-0.03096)&lt;BR /&gt;
    However, the first value of shares purchase is equal to the shares holding&lt;BR /&gt;
&lt;BR /&gt;
3. the first value of cumulative cost including interest equal to the value of shares         purchased*SPX&lt;BR /&gt;
&lt;BR /&gt;
4. the interest is the forward cumulative cost including interest*rate&lt;BR /&gt;
   for example, on the  2004/1/5  the cumulative cost including interest, &lt;BR /&gt;
-0.37817=-34.3208*0.011019&lt;BR /&gt;
&lt;BR /&gt;
5. the latter cumulative cost including interest equal to the sum of cost of shares purchased, forward  cost of shares purchased, and interest.&lt;BR /&gt;
for example: on the 2004/1/15, the cumulative cost including interest, &lt;BR /&gt;
-17.1182=17.5807+(-34.3208)+(-0.37817)&lt;BR /&gt;
&lt;BR /&gt;
6. if the OTM  on the last trading day is bigger than 0.12, the cumulative cost including interest must minus the K&lt;BR /&gt;
for example on the  2004/2/19, optionid is 21278521 cumulative cost including interest is -1.36945-(-990)=988.6305&lt;BR /&gt;
&lt;BR /&gt;
the following is the data, data1 is the ordinary, data1 after the above steps is the data2.&lt;BR /&gt;
&lt;BR /&gt;
please help me, thx~&lt;BR /&gt;
&lt;BR /&gt;
data data1;&lt;BR /&gt;
input Date yymmdd10.	SPX	optionid	K	delta	rate	OTM;&lt;BR /&gt;
format date:yymmdd10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
2004/1/2	1108.48	21213832	990	-0.030962	0.01107094	0.002374423&lt;BR /&gt;
2004/1/5	1122.22	21213832	990	-0.015296	0.011018561	0.013364581&lt;BR /&gt;
2004/1/6	1123.67	21213832	990	-0.013465	0.01098864	0.014508708&lt;BR /&gt;
2004/1/7	1126.33	21213832	990	-0.009658	0.01092533	0.016599931&lt;BR /&gt;
2004/1/8	1131.92	21213832	990	-0.009319	0.010853256	0.020962612&lt;BR /&gt;
2004/1/9	1121.86	21213832	990	-0.008953	0.0108289	0.013080064&lt;BR /&gt;
2004/1/12	1127.23	21213832	990	-0.004376	0.010809861	0.017305253&lt;BR /&gt;
2004/1/13	1121.22	21213832	990	-0.005754	0.010954211	0.012573804&lt;BR /&gt;
2004/1/14	1130.52	21213832	990	0	0.010925194	0.01987404&lt;BR /&gt;
2004/1/15	1132.05	21213832	990	0	0.010892781	0.021063557&lt;BR /&gt;
2004/2/6	1142.76	21266383	990	-0.013135	0.010861995	1.78E-06&lt;BR /&gt;
2004/2/9	1139.81	21266383	990	-0.007781	0.010911943	0.001159593&lt;BR /&gt;
2004/2/10	1145.54	21266383	990	-0.012066	0.01095	0.003282342&lt;BR /&gt;
2004/2/11	1157.76	21266383	990	-0.005021	0.010980483	0.007710792&lt;BR /&gt;
2004/2/12	1152.11	21266383	990	-0.01159	0.010910774	0.000290589&lt;BR /&gt;
2004/2/13	1145.81	21266383	990	-0.007482	0.010911757	0.003998297&lt;BR /&gt;
2004/2/17	1156.99	21266383	990	-0.003989	0.010849384	0.000804481&lt;BR /&gt;
2004/2/18	1151.82	21266383	990	-0.010775	0.010821329	0.00660581&lt;BR /&gt;
2004/2/19	1147.06	21266383	990	0	0.010818377	0.007813259&lt;BR /&gt;
2004/2/6	1142.76	21278521	990	-0.015639	0.010861995	0.01390295&lt;BR /&gt;
2004/2/9	1139.81	21278521	990	-0.014962	0.010911943	0.013078146&lt;BR /&gt;
2004/2/10	1145.54	21278521	990	-0.014319	0.01095	0.019917743&lt;BR /&gt;
2004/2/11	1157.76	21278521	990	-0.014036	0.010980483	0.017086561&lt;BR /&gt;
2004/2/12	1152.11	21278521	990	-0.01365	0.010910774	0.015238054&lt;BR /&gt;
2004/2/13	1145.81	21278521	990	-0.01899	0.010911757	0.025821166&lt;BR /&gt;
2004/2/17	1156.99	21278521	990	-0.012253	0.010849384	0.017171452&lt;BR /&gt;
2004/2/18	1151.82	21278521	990	-0.012702	0.010821329	0.004990784&lt;BR /&gt;
2004/2/19	1147.06	21278521	990	0	0.010818377	0.12&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data data2;&lt;BR /&gt;
input Date yymmdd10.	SPX	optionid	K	delta	rate	OTM shares_holding	shares_purchaded 	cost_of_shares_purchased 	cumulative_cost_interest	interest&lt;BR /&gt;
;&lt;BR /&gt;
format date:yymmdd10.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
2004/1/2	1108.48	21213832	990	-0.030962	0.01107094	0.002374423	-0.030962	-0.030962	-34.32075776	-34.32075776	.&lt;BR /&gt;
2004/1/5	1122.22	21213832	990	-0.015296	0.011018561	0.013364581	-0.015296	0.015666	17.58069852	-17.11822462	-0.378165378&lt;BR /&gt;
2004/1/6	1123.67	21213832	990	-0.013465	0.01098864	0.014508708	-0.013465	0.001831	2.05743977	-15.24889086	-0.188106008&lt;BR /&gt;
2004/1/7	1126.33	21213832	990	-0.009658	0.01092533	0.016599931	-0.009658	0.003807	4.28793831	-11.12755171	-0.166599165&lt;BR /&gt;
2004/1/8	1131.92	21213832	990	-0.009319	0.010853256	0.020962612	-0.009319	0.000339	0.38372088	-10.86460099	-0.120770164&lt;BR /&gt;
2004/1/9	1121.86	21213832	990	-0.008953	0.0108289	0.013080064	-0.008953	0.000366	0.41060076	-10.57165191	-0.117651678&lt;BR /&gt;
2004/1/12	1127.23	21213832	990	-0.004376	0.010809861	0.017305253	-0.004376	0.004577	5.15933171	-5.526598294	-0.114278092&lt;BR /&gt;
2004/1/13	1121.22	21213832	990	-0.005754	0.010954211	0.012573804	-0.005754	-0.001378	-1.54504116	-7.13217898	-0.060539526&lt;BR /&gt;
2004/1/14	1130.52	21213832	990	0	0.010925194	0.01987404	0	0.005754	6.50501208	-0.705087342	-0.077920441&lt;BR /&gt;
2004/1/15	1132.05	21213832	990	0	0.010892781	0.021063557	0	0	0	-0.712767704	-0.007680362&lt;BR /&gt;
2004/2/6	1142.76	21266383	990	-0.013135	0.010861995	1.78E-06	-0.013135	-0.013135	-15.0101526	-15.0101526	.&lt;BR /&gt;
2004/2/9	1139.81	21266383	990	-0.007781	0.010911943	0.001159593	-0.007781	0.005354	6.10254274	-9.071399793	-0.163789933&lt;BR /&gt;
2004/2/10	1145.54	21266383	990	-0.012066	0.01095	0.003282342	-0.012066	-0.004285	-4.9086389	-14.07937052	-0.099331828&lt;BR /&gt;
2004/2/11	1157.76	21266383	990	-0.005021	0.010980483	0.007710792	-0.005021	0.007045	8.1564192	-6.077549607	-0.154598287&lt;BR /&gt;
2004/2/12	1152.11	21266383	990	-0.01159	0.010910774	0.000290589	-0.01159	-0.006569	-7.56821059	-13.71207097	-0.066310772&lt;BR /&gt;
2004/2/13	1145.81	21266383	990	-0.007482	0.010911757	0.003998297	-0.007482	0.004108	4.70698748	-9.154706277	-0.149622788&lt;BR /&gt;
2004/2/17	1156.99	21266383	990	-0.003989	0.010849384	0.000804481	-0.003989	0.003493	4.04136607	-5.212663134	-0.099322926&lt;BR /&gt;
2004/2/18	1151.82	21266383	990	-0.010775	0.010821329	0.00660581	-0.010775	-0.006786	-7.81625052	-13.08532159	-0.056407941&lt;BR /&gt;
2004/2/19	1147.06	21266383	990	0	0.010818377	0.007813259	0	0.010775	12.3595715	-0.867312038	-0.141561944&lt;BR /&gt;
2004/2/6	1142.76	21278521	990	-0.015639	0.010861995	0.01390295	-0.015639	-0.015639	-17.87162364	-17.87162364	.&lt;BR /&gt;
2004/2/9	1139.81	21278521	990	-0.014962	0.010911943	0.013078146	-0.014962	0.000677	0.77165137	-17.29498641	-0.195014142&lt;BR /&gt;
2004/2/10	1145.54	21278521	990	-0.014319	0.01095	0.019917743	-0.014319	0.000643	0.73658222	-16.74778429	-0.189380101&lt;BR /&gt;
2004/2/11	1157.76	21278521	990	-0.014036	0.010980483	0.017086561	-0.014036	0.000283	0.32764608	-16.60403697	-0.183898758&lt;BR /&gt;
2004/2/12	1152.11	21278521	990	-0.01365	0.010910774	0.015238054	-0.01365	0.000386	0.44471446	-16.34048541	-0.1811629&lt;BR /&gt;
2004/2/13	1145.81	21278521	990	-0.01899	0.010911757	0.025821166	-0.01899	-0.00534	-6.1186254	-22.63741422	-0.178303408&lt;BR /&gt;
2004/2/17	1156.99	21278521	990	-0.012253	0.010849384	0.017171452	-0.012253	0.006737	7.79464163	-15.0883746	-0.245602006&lt;BR /&gt;
2004/2/18	1151.82	21278521	990	-0.012702	0.010821329	0.004990784	-0.012702	-0.000449	-0.51716718	-15.76881804	-0.163276259&lt;BR /&gt;
2004/2/19	1147.06	21278521	990	0	0.010818377	0.12	0	0.012702	14.56995612	988.6305451	-0.170593021&lt;BR /&gt;
&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 20 May 2011 09:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67699#M19371</guid>
      <dc:creator>bqk</dc:creator>
      <dc:date>2011-05-20T09:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the value with the forward value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67700#M19372</link>
      <description>which industry role do u work dude</description>
      <pubDate>Sat, 21 May 2011 10:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67700#M19372</guid>
      <dc:creator>Wanderer</dc:creator>
      <dc:date>2011-05-21T10:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the value with the forward value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67701#M19373</link>
      <description>excuse me,  i can not understand what you mean. &lt;BR /&gt;
could you explain the question in detail?&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: bqk

Message was edited by: bqk</description>
      <pubDate>Sat, 21 May 2011 19:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67701#M19373</guid>
      <dc:creator>bqk</dc:creator>
      <dc:date>2011-05-21T19:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the value with the forward value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67702#M19374</link>
      <description>could anyone help me?&lt;BR /&gt;
the main question is the 5 step&lt;BR /&gt;
i do not how to solve it.</description>
      <pubDate>Mon, 23 May 2011 16:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67702#M19374</guid>
      <dc:creator>bqk</dc:creator>
      <dc:date>2011-05-23T16:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the value with the forward value</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67703#M19375</link>
      <description>have you try a do statement?  &lt;BR /&gt;
let x= shares purchase&lt;BR /&gt;
    y = shares holding&lt;BR /&gt;
  a = forward value&lt;BR /&gt;
 b = latter value&lt;BR /&gt;
c= forward cumulative cost&lt;BR /&gt;
d= interest&lt;BR /&gt;
e= interest rate&lt;BR /&gt;
z = latter cumulative cost &lt;BR /&gt;
&lt;BR /&gt;
if criteria statement then do;&lt;BR /&gt;
 y = b - a;&lt;BR /&gt;
d= x*d;&lt;BR /&gt;
c= x + d;&lt;BR /&gt;
z=x+d+forward cost of shares purchased;&lt;BR /&gt;
end;</description>
      <pubDate>Wed, 01 Jun 2011 12:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/calculate-the-value-with-the-forward-value/m-p/67703#M19375</guid>
      <dc:creator>mick_g</dc:creator>
      <dc:date>2011-06-01T12:29:43Z</dc:date>
    </item>
  </channel>
</rss>

