#FOSS Equities Research With The OpenBB Terminal: Hunting Dividend Opportunities
Tags: python, opensource, tutorial, showdev
Published: 2022-04-12 13:41:51

What do you think about when someone gets excited about dividend stocks?  

![The Dividend Calendar - /stocks/disc/divcal (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/discovery/divcal/)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6grsz0lfepp989hb0j1b.png)

You're probably thinking something along the lines of this:

![Add [Didier Memes#2168] to bring a fun Discord Bot for memes into your server!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1gwsjg4oj7j2j7qy6bok.png)

I'm not talking about your grandma's blue chip shares, and I'm certainly not talking about the fabled dividend capture strategy. What I am talking about, however, is a way of reading the data to find actionable opportunities in the short-term that are reasonably safe places to store cash. Any return is better than no return, or better yet, negative interest rates on deposits. 

The stock market can be a reasonable place to store some long-term, rainy day, funds. The liquidity exists (obviously don't put all emergency needs into semi-liquid assets) to meet the demands of many situations because securities are  easily converted into transferrable cash.

If you have an emergency fund worth more than a year's living expenses, and it has been parked in a 0% savings account for some time now, moving a sizeable portion to a major brokerage account, as a way to offset the decrease in purchasing power dead money accumulates, is not a terrible idea. Honestly, you have considered and/or executed much riskier alternatives.
By consuming pop culture media, one might get the impression that stocks = stonks, and everyone is an insane gambling addict. While it's true that you will be thankful to have not taken speculative or complex positions when tapping the primary source of funds after the well dries up, low-risk stocks like Canadian Banks are highly liquid stores of value which historically appreciate in price while paying a dividend. Left to themselves they are compounders, and high interest regimes only generate more income. It shows up on the balance sheet as both, share buybacks and dividend payments. Paying a 4-7% dividend while growing profits, and buying back ~5% of outstanding shares, is a formula for appreciating shareholder equity.

There are situations where a known future date for funds evacuating the pirate ship is 3-6 months; plenty of time to put that cash to work while it's still available. I'm not here to recommend a course of action, only offer ways to think about them. So with ire sufficiently raised, let's pivot away from safe harbours, towards non-traditional applications.

The dividend calendar is located in the Discovery Menu, under Stocks. To display the help dialogue, enter this:
```
/stocks/disc/divcal -h
```

Which displays the help dialogue: 
```
usage: divcal [-d DATE] [-s SORT [SORT ...]] [-a] [-h] [--export EXPORT] [-l LIMIT]

Get dividend calendar for selected date

optional arguments:
  -d DATE, --date DATE  Date to get format for (default: 2022-04-11 20:15:40.109294)
  -s SORT [SORT ...], --sort SORT [SORT ...]
                        Column to sort by (default: ['Dividend'])
  -a, --ascend          Flag to sort in ascending order (default: False)
  -h, --help            show this help message (default: False)
  --export EXPORT       Export raw data into csv, json, xlsx (default: )
  -l LIMIT, --limit LIMIT
                        Number of entries to show in data. (default: 10)
```

Here's the list of stocks trading ex-dividend on Tuesday:
```
/stocks/disc/divcal -d 2022-04-12
```
![Stocks trading ex-dividend on April 12 2022 - /stocks/disc/divcal (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/discovery/divcal/)
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ehfolg4iljv6g2scstjk.png)

The difference between the Ex-Dividend and the Record Date will dictate the minimum amount of time in the trade. Dates closer together are more favourable because they require the least amount of time-investment. UBS has sequential dates, and this would be considered ideal if the yield were more substantial; i.e., the share price is low.  

We can pull a quote to see:
```
2022 Apr 11, 23:39 (🦋) /stocks/ $ quote UBS
                Ticker Quote                
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                ┃ UBS                     ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Name           │ UBS Group AG Registered │
├────────────────┼─────────────────────────┤
│ Price          │ 18.40                   │
├────────────────┼─────────────────────────┤
│ Open           │ 18.62                   │
├────────────────┼─────────────────────────┤
│ High           │ 18.77                   │
├────────────────┼─────────────────────────┤
│ Low            │ 18.39                   │
├────────────────┼─────────────────────────┤
│ Previous Close │ 18.53                   │
├────────────────┼─────────────────────────┤
│ Volume         │ 3,518,127               │
├────────────────┼─────────────────────────┤
│ 52 Week High   │ 21.48                   │
├────────────────┼─────────────────────────┤
│ 52 Week Low    │ 14.42                   │
├────────────────┼─────────────────────────┤
│ Change         │ -0.13                   │
├────────────────┼─────────────────────────┤
│ Change %       │ -0.70%                  │
└────────────────┴─────────────────────────┘
```

At $0.16/share, this is a measly yield and not worth the price of admission. There will be lots of this, but is no reason to give up. Looking at about a month out, we can see what was already announced. Many haven't, the lists will be a little sparser as a result, but it will grow as the date comes closer. 

![Stocks trading ex-dividend on May 5 & 12 - /stocks/disc/divcal (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/discovery/divcal/)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pkpwff1ch0m0m1e4ckct.png)

Ternium ($TX) catches my eye here. It's on my watchlist, is a steel producer play, has a minimum time-investment of only four days, and is trading >10% down from August highs. A daily return on capital of 1% is very good, and four days of holding makes a greater return than any amount of doing nothing. This assumes that the stock price does not swing beyond a pre-defined level of tolerance to the downside.

Looking at a long chart, it trades in a non-frothy range, and is in a top-performing sector for 2022. 

![Ternium ($TX) Daily Candles - /stocks/candle (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/candle/)
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2zxwkdpausatwl74j4o.png)

Even a one-month return of 4% is a very healthy annualized yield. The only objective here is to preserve purchasing power over time; anything else is a bonus. This is the opposite of YOLO hundred-baggers; a safe place to park some cash, for a week or a month, and earn a yield greater than flipping durable goods.

Time to poke some holes in this thought bubble. Here's a weekly chart with moving averages.
```
stocks/load -t tx -s 2006-02-01 -w/candle --ma 21,63,126
```

![Weekly chart of Ternium With Moving Averages (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/candle/)
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bkmwemdr7clou26qi9w.png)

Could be setting up for one more leg up before the ex-dividend date; volume levels are pushing all-time highs. What do the options say about our timeline?

![Open Interest On Ternium, For May Expiration (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/options/oi/)
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ns76zamzzq7hdbm5lw8p.png)

The bell curve forecasts a $50 range, and the closing price was $48.86. Taking this at face-value, it doesn't look primed to jump off a cliff between now and the trading day following the record date. 

![https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/options/binom/](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3m5eunk72hk98dv4ylk7.png)
 
The chains data doesn't disagree. Selling a $46 put will net enough premium to buy a $49 call, that could be one place to gain exposure; but, that doesn't earn yield like shares do, and options are not a part of the key objectives. If nothing else, options are a leading indicator for future prices.  

![Ternium Options Chains For May Expiration (https://openbb-finance.github.io/OpenBBTerminal/terminal/stocks/options/chains/)
](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ba8rigjhcxzuq9kezbhq.png)

At this point, one can see if there is enough meat on the bone to fulfill the requirements and objectives of the capital allocation strategy. Turning over stones can reveal treasures, this is currently a single stock picker's market. What's on your watchlist?
```
/stocks/dd/rating
                                    Rating                                    
┏━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━┳━━━━━┓
┃            ┃ Rating ┃ DCF        ┃ ROE     ┃ ROA     ┃ DE      ┃ PE  ┃ PB  ┃
┡━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━╇━━━━━┩
│ 2022-04-11 │ Buy    │ Strong Buy │ Neutral │ Neutral │ Neutral │ Buy │ Buy │
├────────────┼────────┼────────────┼─────────┼─────────┼─────────┼─────┼─────┤
│ 2022-04-08 │ Buy    │ Strong Buy │ Neutral │ Neutral │ Neutral │ Buy │ Buy │
├────────────┼────────┼────────────┼─────────┼─────────┼─────────┼─────┼─────┤
│ 2022-04-07 │ Buy    │ Strong Buy │ Neutral │ Neutral │ Neutral │ Buy │ Buy │
├────────────┼────────┼────────────┼─────────┼─────────┼─────────┼─────┼─────┤
│ 2022-04-06 │ Buy    │ Strong Buy │ Neutral │ Neutral │ Neutral │ Buy │ Buy │
├────────────┼────────┼────────────┼─────────┼─────────┼─────────┼─────┼─────┤
│ 2022-04-05 │ Buy    │ Strong Buy │ Neutral │ Neutral │ Neutral │ Buy │ Buy │
└────────────┴────────┴────────────┴─────────┴─────────┴─────────┴─────┴─────┘
```

If you made it this far come say hello, ask questions, or get support on Discord: https://discord.com/invite/Up2QGbMKHY


http://openbb.co