Login     Register

        Contact Us     Search

XLeratorDB/financial-options Documentation

SQL Server function for converting discrete barrier values


AdjustedBarrier

Updated: 31 Oct 2013


Use AdjustedBarrier to convert an hourly, daily, weekly, or monthly barrier value to a continuous barrier value.
Syntax
SELECT [wctOptions].[wct].[AdjustedBarrier](
  <@AssetPrice, float,>
 ,<@BarrierPrice, float,>
 ,<@Volatility, float,>
 ,<@Frequency, nvarchar(4000),>)
Arguments
@AssetPrice
the price of the underlying asset. @AssetPrice is an expression of type float or of a type that can be implicitly converted to float.
@BarrierPrice
For a knock-in option, @BarrierPrice is the value at which the option comes into existence if the @AssetPrice crosses the barrier. For a knock-out option, @BarrierPrice is the value at which the option is extinguished if the @AssetPrice crosses the barrier. @BarrierPrice must be of a type float or of a type that implicitly converts to float.
@Volatility
the volatility of the relative price change of the underlying asset. @Volatility is an expression of type float or of a type that can be implicitly converted to float.
@Frequency
identifies the monitoring frequency for the barrier. @Frequency is an expression of type nvarchar or of a type that can be implicitly converted to nvarchar. Use 'H' for hourly, 'D' for daily, 'W' for weekly, and 'M' for monthly.
Return Type
float
Remarks
·         @Volatility must be greater than zero (@Volatility > 0).
·         @AssetPrice must be greater than zero (@AssetPrice > 0).
·         @BarrierPrice must be greater than 0.
Example
SELECT wct.AdjustedBarrier(
100      --AssetPrice
,97      --BarrierPrice
,.20     --Volatility
,'D'     --Frequency
) as AdjustedBarrier

This produces the following result.
       AdjustedBarrier
----------------------
      96.4102036452333
 


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service