09-01-2015
toddtodd
Calcite | Level 5
Member since
02-02-2013
- 20 Posts
- 5 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by toddtodd
Subject Views Posted 3962 11-12-2013 05:38 PM 4081 11-12-2013 12:43 AM 790 10-30-2013 05:59 PM 2237 08-02-2013 04:39 PM 2237 07-16-2013 08:38 PM 2460 07-16-2013 02:14 PM 603 07-15-2013 04:18 PM 1000 03-01-2013 12:45 AM 1069 02-28-2013 07:10 PM 1482 02-03-2013 11:45 PM -
Activity Feed for toddtodd
- Posted Re: Anyone know how to use the IRR function? on SAS Programming. 11-12-2013 05:38 PM
- Posted Anyone know how to use the IRR function? on SAS Programming. 11-12-2013 12:43 AM
- Posted How to change the length of a variable name? on SAS Programming. 10-30-2013 05:59 PM
- Posted Re: Proc Expand on SAS Forecasting and Econometrics. 08-02-2013 04:39 PM
- Posted Re: Proc Expand on SAS Forecasting and Econometrics. 07-16-2013 08:38 PM
- Liked Re: Proc Expand for udo_sas. 07-16-2013 08:38 PM
- Posted Proc Expand on SAS Forecasting and Econometrics. 07-16-2013 02:14 PM
- Liked Re: SAS or R. for Reeza. 07-15-2013 11:35 PM
- Posted SAS or R. on SAS Programming. 07-15-2013 04:18 PM
- Posted Re: Not sure how to write a macro for the following on SAS Programming. 03-01-2013 12:45 AM
- Posted Not sure how to write a macro for the following on SAS Programming. 02-28-2013 07:10 PM
- Posted Re: SAS Macro Do Loop on SAS Programming. 02-03-2013 11:45 PM
- Posted Re: SAS Macro Do Loop on SAS Programming. 02-03-2013 10:43 AM
- Posted SAS Macro Do Loop on SAS Programming. 02-02-2013 05:57 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 1
11-12-2013
05:38 PM
Oleg, It worked perfectly. Thank you for the second email since making a daily data set was the key. Todd
... View more
11-12-2013
12:43 AM
I have a variable with 10 quarters of cash flow. It looks like the following: The variable in SAS is called Axiom. I want to calculate the IRR but I am not sure how. I looked it up but still confused. Thank you, Date Axiom 6/30/2013 ($17,601,671) 9/30/2013 $575,049 12/31/2013 $575,049 3/31/2014 $562,548 6/30/2014 $568,799 9/30/2014 $819,636 12/31/2014 $812,448 3/31/2015 $793,071 6/30/2015 $792,055 9/30/2015 $790,883 12/31/2015 $783,695 3/31/2016 $770,725 6/30/2016 $763,615 8/15/2016 $17,868,981
... View more
10-30-2013
05:59 PM
I have a data set, which is a balance sheet, that I imported from Excel that looks like: Variable Amount Gaming Equipment, Vehicles and Other Equipment 585860 Revenue 1000490 I successfully was able to import the above data set by using length variable $78 to include all the words in gaming, equipment, vehicles and other equipment. I would like to transpose the data set. I can successfully do so by doing the following. proc transpose data=work.BS out=BS_transpose; id variable; var Amount; run; The problem is that the variable name "Gaming Equipment, Vehicles and Other Equipment" is too long for SAS. How do I lengthen the variable name? Thank you, Todd
... View more
08-02-2013
04:39 PM
I just upgraded to SAS 9.3. I used the following to change daily values to one end of month value. It worked in 9.2 but it does not work in 9.3. Any idea why? proc timeseries data=work.MA out=MA_monthly plot=series; id date interval=month accumulate=last; var MA_alloc_daily; run; I get the following message: [Fatal Error] :1:8: The processing instruction target matching "[xX][mM][lL]" is not allowed. Internal Exception:org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed. org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at com.sas.graphics.app.StatGraphSSR.parseXML(StatGraphSSR.java:499) at com.sas.graphics.app.StatGraphSSR.render(StatGraphSSR.java:197) Problem reading XML java.lang.NullPointerException at com.sas.graphics.applets.statgraph.StatGraph.getSessionLocale(StatGraph.java:3632) at com.sas.graphics.app.StatGraphSSR.render(StatGraphSSR.java:205) java.lang.NullPointerException ERROR: Physical file does not exist, C:\Users\Todd\AppData\Local\Temp\SAS Temporary Files\_TD9404_TFELDMANE6430_\_20C3F95075E4D4DA951C23DCEEC2DF6.bmp. ERROR: Physical file does not exist, C:\Users\Todd\AppData\Local\Temp\SAS Temporary Files\_TD9404_TFELDMANE6430_\_20C3F95075E4D4DA951C23DCEEC2DF6.bmp.
... View more
07-16-2013
02:14 PM
For some reason I cannot figure this simple thing out. I am using proc expand to convert a daily time series into a monthly series. I do not want to fit the data using the variety of options. I would like to take the end of month value in the daily time series and use those value to create a monthly time series. However, I am not sure what option I use. Thank you, Todd
... View more
07-15-2013
04:18 PM
I will be working for a financial firm that performs valuations. They currently use all their models with Excel and 80% of the business requires standard models with no or little customization. I would live to automate the valuation modelling process by using either SAS or R. I am already a SAS user and I have not used R. However, R is free and more people seem to be using it. For automation purpose can I get any insight into which program is better suited.
... View more
03-01-2013
12:45 AM
Thank you. I will try the code out. The example was for one secid. I have 25,000 secid where some of the secid have over 2400 weeks of loss information.
... View more
02-28-2013
07:10 PM
Also, here is an example. Lhat_t = current loss_t * tmp2 + lhat_t-1 * tmp1 At each week lhat is calculated based on the lhat last week and the new current loss. tmp1= 0.986629 tmp2= 0.013371 Weekid current Loss lhat 1 0.0120 0.0120 2 0.0050 0.0119 3 0.0000 0.0117 4 0.0230 0.0119 I am trying to write the code below as a loop. data work.alldata_lhat; set work.alldata_lhat; by secid; if count=1 then oldlhat=current_loss; if count=1 then lhat=tmp1*oldlhat+tmp2*current_loss; oldlhat=lag(lhat);if count> 1 then lhat=tmp1*oldlhat+tmp2*current_loss; oldlhat=lag(lhat);if count> 2 then lhat=tmp1*oldlhat+tmp2*current_loss; oldlhat=lag(lhat);if count> 3 then lhat=tmp1*oldlhat+tmp2*current_loss; oldlhat=lag(lhat);if count> 4 then lhat=tmp1*oldlhat+tmp2*current_loss; oldlhat=lag(lhat);if count> 5 then lhat=tmp1*oldlhat+tmp2*current_loss; _loss;
... View more
02-03-2013
11:45 PM
Here is an example of the data set. The result is cash_interest. Not sure if my attempts will help. I kept getting weird results. I appreciate the comments. Cusip Date month Ending_Principal yield coupon Cash_Interest 05922KHH5 12/31/2012 0 45100000 0.053 0 $0 05922KHH5 1/31/2013 1 45100000 0.053 0.00245 $110,495 05922KHH5 2/28/2013 2 45100000 0.053 0.00245 $110,495 05922KHH5 3/31/2013 3 45100000 0.053 0.00509 $229,559 05922KHH5 4/30/2013 4 45100000 0.053 0.00463 $208,813 05922KHH5 5/31/2013 5 45100000 0.053 0.00528 $238,128 05922KHH5 6/30/2013 6 44000000 0.053 0.00594 $0 05922KHH5 7/30/2013 7 44000000 0.053 0.06 $0 07133AET5 12/31/2012 0 75000000 0.015 0 $0 07133AET5 1/31/2013 1 75000000 0.015 0.0037 $277,500 07133AET5 2/28/2013 2 75000000 0.015 0.00522 $391,500 07133AET5 3/31/2013 3 75000000 0.015 0.00742 $556,500 07133AET5 4/30/2013 4 75000000 0.015 0.00911 $683,250 07133AET5 5/31/2013 5 75000000 0.015 0.01277 $957,750 07133AET5 6/30/2013 6 75000000 0.015 0.01559 $0 07133AET5 7/31/2013 7 75000000 0.015 0.01621 $0 07133AET5 8/31/2013 8 75000000 0.015 0.014 $0 When
... View more
02-03-2013
10:43 AM
Thank you for the reply. The flag worked perfectly. I was trying to program a loop for a long time and ust out of curiosity how would a loop work? I could not figure it out. Thank you, Todd
... View more
02-02-2013
05:57 PM
I have a cross-sectional time series data set. I have a cusip and time id. I would like to write a loop that performs a calculation every time period until the stopping command for every cusip. For example the data set looks like this: Cusip Time Yield Coupon Principal x9900 1 0.02 0.01 10,000 x9900 2 0.02 0.015 10,000 x9900 3 0.02 0.022 10,000 5H33 1 0.03 0.025 5,000 5h33 2 0.03 0.033 5,000 5h33 3 0.03 0.029 5,000 I would like to write a loop that multiplies Principal times coupon for every time period (by cusipu) but stops when the coupon is greater than the yield. The reason I would like a loop is because I want the calculation of principal times coupon to stop permanently for a cusip when the coupon is greater than the yield. For example, for the cusip 5h33 the coupon is greater than the yield at time 2. So the calculation should stop at time 2. However, at time 3 the coupon is less than the yield. Without a loop the multiplication continues, however, I want it to stop. Any help please would be great. Todd Feldman Assistant Professor
... View more