Hi everyone, I'm facing an issue when doing an itrative sum using factorials. This is the first time I use both an iterative sum and the FACT function so I guess there are a lot of things wrong in my code. Want I want is the formula I hereby attached. Here it its: data lsv.right; set lsv.left; do i=0 to i=(buy+sell); right = ((fact(buy+sell)/ (fact(i)+fact(Buy+sell-i)))*(i/(buy+sell))*((1-Pt)**(Buy+sell-i))*abs((i/(buy+sell)-Pt)))+ right; end; run; Here is a sample of data I have. BUy and sell are integers. Buy Sell Pt Right 3 4 2,7865 8 10 6,78783 Could you please help me with it ? Thank you
... View more