|
In the last trading object I have shared (Covered Call Screener), covered call potential candidates were retrieved from a Covered Call Screener (The data is retrieved from avasaram.com). In this item, it is time for Covered Put strategies data to be retrieved for US stocks. The data is saved into a database (options_covered_put) which have 11 fields + the date field.
The fields are: Price, Option, Type, Strike, Expiry, Bid, Volume, Open-Interest, Time-Value, Return-On-Exercise and Probability of maximum return. I have included a small description of each field here: Covered Call Screener.
Here is an example on how to use this data with the watchlist plug-in of QuantShare:
After you downloaded some data using this item, open the watchlist plug-in (Tools -> Watchlist).
Select the 'watchlists' tab then click on 'Create dynamic watchlist'.
In the 'Dynamic watchlist' form, click on 'Next' then type the following formula:
prob = GetData('options_covered_put', 'prob', LastData);
filter = prob > 50;
AddColumn('Strike', GetData('options_covered_put', 'strike', LastData));
AddColumn('Prob', prob);
Click on 'Finish'; save your item and wait until the watchlist plug-in finishes its update.
The problem with this function is that the 'GetData' function will get the value of the first item in the database for a specific day. If for example GOOG has three options for today, the 'GetData' will only get the first item. In order to account for all data within the same day, we have to create a custom function. I will create this function later and post a link to the function object.
|