Naked Option Margin Calculator

Naked Option Margin Calculator

Estimate margin required for selling naked options.

Definitions:
Gross Maintenance Margin is your margin required
Net Margin Required is your net cash required.

Broad based indexes use 15% vs 20% in the margin calculation

Underlying Type   
Underlying Price $$
Option Price $


//

$optionProceeds = $optionPrice * 100.0 * $optionContracts;
$tenPercentOfUnderlying = 0.10 * $stockPrice * 100.0 * $optionContracts;
if ( $underlyingType == ‘i' ){
$twentyPercentOfUnderlying = 0.15 * $stockPrice * 100.0 * $optionContracts;
}
else {
$twentyPercentOfUnderlying = 0.20 * $stockPrice * 100.0 * $optionContracts;
}
$outOfMoneyAmount = 0.00;

if ( ($optiontype == ‘c' && $stockPrice < $optionStrike)
|| ($optiontype == ‘p' && $stockPrice > $optionStrike) ) {
$outOfMoneyAmount = 100.0 * abs($stockPrice) – $optionStrike * $optionContracts;
}

$case1 = $optionProceeds + $twentyPercentOfUnderlying – $outOfMoneyAmount;
$case2 = $optionProceeds + 10.0 * $optionContracts * $optionStrike;

if ( $case1 > $case2 )
$margin = $case1;
else
$margin = $case2;

$marginInitial = $margin – $optionPrice * 100.0 * $optionContracts;

/* debugging
echo ‘tenPercentOfUnderlying = ‘ . $tenPercentOfUnderlying . ‘
‘;
echo ‘outOfMoneyAmount = ‘ . $outOfMoneyAmount . ‘
‘;
echo ‘twentyPercentOfUnderlying = ‘ . $twentyPercentOfUnderlying . ‘
‘;
echo ‘margin = ‘ . $margin . ‘
‘;
echo ‘case1 = ‘ . $case1 . ‘
‘;
echo ‘case2 = ‘ . $case2 . ‘
‘;
*/

if ( $optiontype == ‘c' && $stockPrice > $optionStrike ) {
echo ‘

Call is in-the-money

‘;
}
else if ( $optiontype == ‘c' && $stockPrice < $optionStrike ) {
echo ‘

Call is out-of-the-money

‘;
}
else if ( $optiontype == ‘c' ) {
echo ‘

Call is at-the-money

‘;
}
else if ( $optiontype == ‘p' && $stockPrice < $optionStrike ) {
echo ‘

Put is in-the-money

‘;
}
else if ( $optiontype == ‘p' && $stockPrice > $optionStrike ) {
echo ‘

Put is out-of-the-money

‘;
}
else {
echo ‘

Put is at-the-money

‘;
}
echo ‘

Initial Margin

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

‘;
echo ‘

$' . number_format($margin, 2, ‘.', ‘,') . ‘ Gross Maintenance Margin
-$' . number_format($optionPrice * 100.0 * $optionContracts, 2, ‘.', ‘,') . ‘ Proceeds from sale of short options
$' . number_format($marginInitial, 2, ‘.', ‘,') . ‘ Net Margin Required

‘;

}
?>