dwright5816
New member
Ultimately, I'm trying to add a column that calculates the annualized return on risk capital of selling a put, assuming it expires worthless.
So the formula for that would be something like this:
But when I add this custom column to Options Chain, it often reports the wrong ARORC compared to my hand calculated values using the same formula.
So I break down the individual components as separate custom columns, and I find that GetDaysToExpiration() returns a number but that number is not really the days to expiration of that option. For example, on May 14th, the option BABA200515P85, GetDaysToExpiration is returning "15", when it should be returning "1".
Am I doing something wrong, or can anyone think of another way to accomplish the same end result?
So the formula for that would be something like this:
Code:
def premium = 100*(ask+bid)/2;
def commission = 0.65;
def riskCapital = 100*GetStrike() - premium;
def dte = GetDaysToExpiration();
plot ARORC = 100*((premium-commission) /riskCapital) * (365/dte);
But when I add this custom column to Options Chain, it often reports the wrong ARORC compared to my hand calculated values using the same formula.
So I break down the individual components as separate custom columns, and I find that GetDaysToExpiration() returns a number but that number is not really the days to expiration of that option. For example, on May 14th, the option BABA200515P85, GetDaysToExpiration is returning "15", when it should be returning "1".
Am I doing something wrong, or can anyone think of another way to accomplish the same end result?