of TFNN, Wall Street Money Hour with your host Peter Bruno. Call 1-877-927-6648 to talk with Peter Live. Now, Peter Bruno. Hello everyone, this is the Wall Street Money Hour. This is Peter Bruno, your host. And today was quite a bit of a turnaround overnight. And over the weekend, we heard about the war in the Middle East and the pre-markets were down quite a bit. And suddenly there's been a turnaround with the Dow up 174 points now, the S&P up 25 points, and the Nasdaq up 56 points. And you can see that the war stocks, as we mentioned in the previous update, Lockheed Martin are anticipating the news that perhaps the United States is going to defend its ally in Israel and wind up getting into this war or at least supplying them with enough equipment that they need in order to defeat the aggressors. In any event, the Wall Street Money Letter is the newsletter that we publish every week. We're waiting for it to be updated online with TFNN. So in the interim, we'll talk about certain things that may be of interest to the listening audience. And here I have the Wall Street Money Letter online. You should be seeing it on your screen. And therefore, the Wall Street Money Letter gives us a weekly market analysis. It gives us issues under consideration. Last Friday we had our AI, Algorithmic Research Analyst, Megan Ramsey, on giving us some indicators regarding the three stocks that we have within that. We're trying to sell one of the three stocks, which was Visa. And therefore, the way the... And that's when we would be covering these issues, same issues that we recommend based on issues under consideration or action alerts that we send out based on the Wall Street Money Letter. Now, the Wall Street Money Letter may be different from other newsletters and that once a person subscribes their Wall Street Money Letter, the communication other than the weekly market analysis that we do would be based on action alerts. And that goes back to the fact that anything that we think we should be buying in our own account, we would recommend that you buy in your account. I think that's fair. If it's good enough for me, it's good enough for you. And I remember seeing a cartoon 30 years ago in, I think, it was the Wall Street Journal. I think they had cartoons every day. And one broker was on a line with his client saying, of course, I think it's a good stock. I was even thinking of buying it myself. So the idea is with these action alerts, if we want to buy something, we'll place an order to buy at a specific price stock that we configured to be the best price to buy for that. And then we immediately send out an action alert email to the subscriber telling them that we bought XYZ stock at that price. It was completed today when it's completed. Sometimes during the day, we'll place an order in our Wall Street Money Letter trading account to buy at a specific price, but we may never get that price. So if we don't get that price, we didn't buy it, and therefore, we won't send out an action alert to the subscribers. But once we've completed that trade, and once the price is executed, then we send out the email to the client subscriber saying we bought at this price today this particular stock. Now the subscriber, as we mentioned, has three choices. You can pick up your broker.  You may pick up your broker and call your phone if you want. Or you can ignore the information. So I already owned that stock in my portfolio. I really don't need any more. Or you can track it, which most new subscribers would do to see, let's see how well I would have done if I would have followed the Wall Street Money Letter advice. Now, regardless of whether you bought the stock, tracking it, or you ignored it, we're obligated to send you an action alert when we sell the stock. In the event that we sell the stock, when we lose the draw, we will send out the same action alert email to the subscribers. I think it is only fair. And then we build a track record based on the successful recommendations that were made. Now, in addition to that, we have different types of portfolios on the Wall Street Money Letter. And we show you what we do. And then we say suitable various investment styles, exchange-traded funds, trading strategy. We use exchange-traded funds in two ways. One, the actual exchange-traded fund, which is really a basket of stocks. So if you had an ETF of the SPY, which is a basket of the 500 stocks and the S&P 500, well, instead of buying each individual stock, you could just buy the basket. And if the basket of stocks move up, the SPY would move up. If we were negative on the SPY or the Dow, and I think it's DOG, which is a dog of the Dow, meaning that the 30 stocks of the Dow should be moving down. Therefore, the DOG, which is the ETF of that basket of inverse downstock, should move up. Now, there's a couple of ways that you can use these recommendations that we give, whether it's by long or whether we buy inverse to the ETF. And basically, it's a strategy of hedging your existing portfolio. So if you have an existing portfolio of long stocks, you're counting on the market moving up. So therefore, at the end of the day, after the market moves up, you made money in your portfolio, or at least the stocks in your portfolio that moved up. Now, not all stocks move up when the market moves up. If you hear market reports that say the Dow, Jones & Tushall average was up 100 points today. However, there were 600 stocks that were up and 300 stocks that were down. Well, who wants the 300 stocks that are down? In sectors or industries that were negative to the overall market, and they would move down while the rest of the market moved up. And that's based on sector analysis, which we do as well. So a good idea to have a long portfolio is to say, well, I'm long with the market being up right now, 193 points based on the Dow, and the 26 points up for the S&P 500 or 53 points for the NASDAQ. You may say to yourself, well, I know at the end of the day, my portfolio is going to be up, but how do I chance it? And how do I hedge that portfolio in the event the market turns around? News tonight, who knows what's going to be? And if the market's going to open up or down the following day. So you may want to hedge your portfolio. And when we come back, it was great. I'll give you an idea of how we hedge our various portfolios. Right back. Currencies, commodities and bond markets are as important as ever right now with how they're driving the volatility in equity markets across the globe, which is why it's a great time to try out Teddy Kegsatz Tiger Forex report. Teddy Kegsatz breaks down the forex markets every Monday using his 30 plus years of experience as a trading veteran of futures, forex, stocks and options. Teddy releases his weekly Tiger Forex report every Monday morning with coverage of all the major currency pairs, including the dollar index, the Euro dollar, pound dollar, dollar Swiss, dollar yen, as well as many more. And he also has weekly coverage of the crude oil market and the 30 year T bonds as they both influence forex markets tremendously. When you sign up for the Tiger Forex report, you also gain instant access to Teddy's 60 minute webinar archive. He just hosted forex strategies and fundamentals. What is behind the Tiger Forex report? For all the details and to start your 30 day Tiger Forex report subscription today, visit the front page of TFNN.com. TFNN Educating Investors. He continues to hold the most effective safe haven and hedging properties across the global major trading hubs of the London OTC market, the US futures market, and the Shanghai Gold Exchange. The Gold Report. Tom O'Brien publishes his weekly Gold Report every Monday morning for subscribers, consisting of coverage of the XAU, HUI, GDX, the dollar, bonds, the South African Rand, as well as 25 different mining equities with specific buy sell recommendations. The Gold Report. New subscribers get a 30 day money back guarantee so you have nothing to risk. Subscribe to Tom O'Brien's Gold Report newsletter now at TFNN.com. Tom publishes his daily Market Insights newsletter every market day before the market open, along with updates when warranted. Stay ahead of the game with Tom's real-time analysis and trade recommendations delivered straight to your inbox.  Ready to join the ranks of successful traders? Head over to TFNN.com and subscribe to Market Insights today. Don't miss out on this opportunity to supercharge your trading results. Market Insights comes with a 30 day money back guarantee for all new subscribers so you have nothing to risk. Don't miss out on this opportunity to revolutionize your trading game. Head over to TFNN.com right now to join the thousands of traders who have already experienced the power of Tom O'Brien's award-winning newsletter Market Insights firsthand. TFNN Educating Investors. Welcome back to the Wall Street Money Hour. This is your host Peter Bruno. Before the break, we were talking about the hedging long portfolios that we have, or you may have, and right now the ES or the S&P 500 futures is at 43.70, 75. Up 29.25 points. The high today was 43.72, 50. And so if you are at a portfolio of all long stocks, you may consider to say, well, at the end of the day, right now, I believe we're going to be positive and my portfolio is going to be up 1% or so. So therefore, I may want to hedge my portfolio by adding a negative ETF into my account. The negative ETF goes down when the market goes up and it goes up and the market goes down. So what you want to do is the SQQQ is the symbol for the inverse S&P 500. So therefore, right now, the inverse S&P 500 is at 1907 down around 30 points. So therefore, not 30 points, down 30 cents, actually. So therefore, you may want to buy the SQQQ at $19.07 and therefore hedging the portfolio. So what happens at the end of the day, if the market continues to move up, well, all your stocks and your portfolio would move up and you'd be happy about that. But then when you look at the SQQQ, you see that the SQQ is down from your purchase price and therefore the small amount that is down doesn't equate to the large amount that your portfolio is up.  So that's basically how to hedge your portfolio. There's no big deal about hedging your portfolio because you have the majority of going up and the market is going up and then you have the minimum going down and the market is moving down. At least you have that opportunity. Okay, now you have the Wall Street Money Leather. We mentioned the ETF and we'll recommend those things as a hedge for the portfolio. We have index future trading, which we just talked about, the low price stocks. We have options trading strategy and then there's one more that we have that falls into the short-term stock trading and that's what we call dividend capture. Dividend capture, frankly, is my favorite way of making money because I consider it really free money and I consider it free money because it's a way of capturing the dividend and getting it for free. Let me see if I can get my chart up here. Okay, you can see I'm new to this and I'm looking for... Here we go. Okay, let's try to swing it to where the dividend can see it. Okay, well, anyway, I'm still trying to do that but I can tell you that here we go. Okay, here's the stocks that we're monitoring and we're monitoring these stocks to identify which stocks we would be recommending as action alerts and as we go through these charts you can see the S&P 500 that's up in there is basically, we call this the Bruno oscillator. When the Bruno oscillator gets to the resistance area which was up here, then we expect the market to move down which it did right here and then after it hits the support level, we expect the market to move up again to resistance level which is right here and then after we sell here we expect the market to move down and it looks like it's down here is the resistance level and from that resistance level we seem to have started to move up with the S&P 500 and if it continues to move up we'll move up back up to 4500. It takes about 18 or 19 days to go from support to resistance so if there's no aberration within the market even though we say that three steps up and two steps down that could also correct however the trend should continue to be up. Here we have Apple computer seems to be doing well it's up $1.07 today the 178.56 you can see it's getting close to the resistance level of around 180 and these are areas rather than specific numbers and you can see how it did here you know here it was support at this level here, 196 support I mean resistance was 196 it broke down to support of 172 went back up to 190 and then it went down to 168 and now it seems to be moving back up and the resistance now would be 180 so if you own app I wouldn't hold on to it much longer because if it goes up to 180 it should be sold and because it should be moving back down okay Netflix is another thing we're monitoring and you can see it seems to be bouncing from the support area Amazon which was in our portfolio it's holding its own you can see from the chart chart works well oscillator works very well with identifying resistance coming down to support back up to resistance down to support the positive QQQs are support level that's not the that seems to be moving up there the Dallas Jones and Dutchall average is at support and moving up Adobe is another stock we're looking at now that doesn't mean we're going to be buying these stocks what it means is that we're going to configure the algorithms and the AI based on these stocks and try to identify a low point that we want to buy the stock here's a stock that's under consideration that we're ready to send out an action alert and the action alert for lows and let's just look at the Home Depot Home Depot this Home Depot looks pretty much the same as lows and let's go back to lows now Home Depot if we did make send an action alert on Home Depot that would be a buy long for the stock to move back up however if we were going to do an action alert on lows lows is a little different story lows is a dividend capture stock that means that lows will be paying a dividend shortly I think it's the 11th and we're trying to buy it at a lower price the dividend for lows is $1.10 so we'll be right back and explain more about that and that is just launched their new trading room the Tiger's Den hosted at Discord TFNN has been educating traders for more than 20 years with live programming hosted by a variety of professional traders during market hours and now they are expanding their reach with the Tiger's Den available to all tigers and tigers for just $1 for the year there's no catch or added costs when you join our community of traders in the Tiger's Den you can look over the shoulders of Tom O'Brien the TFNN hosts while they analyze charts during their live Tiger TV programs and join an interactive trading community with hundreds of members exchanging ideas interact with other tigers and tigers as they share trading ideas news analysis and discuss the market action all trading day even at night and on the weekends the Tiger's Den at Discord is accessible on mobile or tablets as well so it's always at your reach to sign up today and become a part of this educational community of traders just visit the front page of TFNN.com sharpening your skills as an investor is like getting better at playing a musical instrument you have to practice sure but you also need excellent instruction from experts at TFNN you'll get advice and guidance from the authority and technical market analysis and it's not just dry tedious text either TFNN airs live financial content streamed live on TFNN.com TFNN's YouTube channel with Tiger TV live every market day from 8.30 a.m. to 4.00 p.m. Eastern for free each host is an experienced trader and gives their take on the market while taking calls and questions live from around the world from the moment the market opens until the closing bell sounds Tiger TV has eight different shows with expert hosts to help you make the right moves with your money watch online at TFNN.com or on TFNN's YouTube channel and become the investor you were born to be TFNN Educating Investors Are you ready to take your trading to the next level? Introducing Tom O'Brien's award-winning newsletter Market Insights your key to successful active trading Tom O'Brien renowned for his expertise in the financial markets has designed Market Insights to be your daily guide to profitable trades Tom publishes his daily Market Insights newsletter every market day before the market open along with updates when warranted ahead of the game with Tom's real-time analysis and trade recommendations delivered straight to your inbox whether you're a seasoned trader or just starting out Market Insights provides the edge you need to navigate the markets with confidence Ready to join the ranks of successful traders? Head over to TFNN.com and subscribe to Market Insights today Don't miss out on this opportunity to supercharge your trading results Market Insights comes with a 30-day money-back guarantee for all new subscribers so you have nothing to risk Don't miss out on this opportunity to revolutionize your trading game Head over to TFNN.com right now to join the thousands of traders who have already experienced the power of Tom O'Brien's award-winning newsletter Market Insights firsthand TFNN Educating Investors Don't forget, you can listen to TFNN live on your mobile device 24 hours per day Go to TFNN.com and hit Watch Tiger TV That's TFNN.com and hit Watch Tiger TV And welcome back to the Walls for Money Hour This is your host, Peter Bruno And the Dow Jones Industrial Average is now up 197.44 points The S&P 500 is up 29.26 And NASDAQ is up 65 points even And before the break we were talking about a unique strategy called Dividend Capture Dividend Capture is something I call free money And here's the reason why We were showing charts in comparison between Lowe's LOW symbol and Home Depot HD I think I remembered on a previous program I had mentioned a client of mine from Chicago used to rent space in their retail space that they had He had many retail spaces And he said we were talking about the difference between Lowe's and Home Depot He said, Peter Lowe's would only open a store if it's within distance of Home Depot Well, that's so true because no matter if I go to Orlando, if I go to Boca or wherever I'm going if I look at a Home Depot within blocks would be the Lowe's store That's their strategy of competing against Home Depot Now, we mentioned that Lowe would be a Dividend Capture stock for us And the reason for that is that it's going to be paying a dollar ten in Dividend this quarter and the Dividend X Dividend date is 1024 So 1024 is 14 days from now and therefore the way Dividend Capture works is you need to own the stock prior to the X Dividend date So anyone that owns the stock prior to 1024 would receive a dollar ten in their portfolio about a week later when the Dividend is paid to all subscribers X Dividend means that on the X Dividend date which would be 1024 if you try to buy the stock before, that says you're buying it without the Dividend So what happens is on the 23rd close Whatever Lowe's close is at on the 23rd the following morning it opens minus a dollar ten after it went down a dollar ten but it just means that the dollar ten is reduced from the closing price the day before the dollar ten is going to be sent to subscribers to Dividend Holders and subscribers as well if we were able to buy Lowe's at the price we want to buy that Now right now Lowe's is at $200 a share $200 and 20 cents The Lowe's today was 196 46 We're trying to buy Lowe's at 197 therefore if we would have placed the order and we didn't or if we would have sent the action alert and we didn't last night or this morning and if we send our action alert in our trading account we're trying to buy at 197 or lower we would have bought the stock at 196 46 or somewhere around there below the 197 area it's up 66 cents and between now and 1024 there's an opportunity perhaps for Lowe's to move down especially if the market corrects or if the market moves down to that area we'll be able to buy our stock at 197 and if we buy the stock at 197 we expect support to be at the $200 level 197, 198 level and therefore this is another opportunity not only for dividend capture Lowe's just follow dividend capture instead of put option strategy where we can sell a put sometime in the future at 198, 199 and receive the premium if we correct and our cycles move up from the low point where it is at this point at $200 a share okay so on a dividend capture we're trying to buy the stock at 197 if we port the stock at 197 and the stock moves up then we know that we can hold on to that stock and when it reaches 1024 if the cycles are still in our favor we continue to hold the stock and subscribers and holders of Lowe's would receive $1.10 about a week after the X dividend date now right now the resistance on Lowe's based on our analysis is around $217 so if we correct and the market moves up from $200 to say $210 $212 $215 $217 because remember we say this is an area that specific number why are we holding on to that stock for $1.10 when we just made 10 points in owning the stock so forget about the dividend we would sell the stock take our profit and move on and forget about holding it for the dividend because who knows by the time it gets up to 1024 the cycles may have changed from being oversold as support to overbought had resistance and we see in the chart on the screen to the right that resistance means that the stock is going to move down after resistance okay so now we have other options that we could wait for us to buy the stock if it goes down to $197 however we can also sell a put on the lows selling a put means that you sell at this price at $200 and if the stock say you sell it at $200 let's say they're going to give us $4 a put so it's a one put you got $400 10 puts you sell it at $4000 we keep on warning subscribers and listeners you have to sell a put you have to have enough money in the account in the event it doesn't go up and you're assigned the stock by the person that bought the put option that was sold and therefore you have to have enough money in your account to cover the put option that was sold in the event you get assigned I guess that could happen 10% of the time based on my calculations now Home Depot we mentioned was another stock is on our list however Home Depot doesn't go ex-dividend until November sometime and ex-dividend the dividend on Home Depot is $2.99 but because it's not an ex-dividend stock what we have to do with Home Depot is just go out to buy the stock not buying the stock because of the dividend the Home Depot is at currently $294.54 up $1.62 based on our algorithmic trading and based on our AI we want to buy the stock at $290 a share so when you're dealing with higher price stocks like Home Depot it's up $162 it can easily go down to $190 this morning it was down to $289.68 so basically if you were to place the order earlier your skills as an investor is like getting better at playing a musical instrument you have to practice sure but you also need excellent instruction from experts at TFNN you'll get advice and guidance from the authority and technical market analysis and it's not just dry tedious text either TFNN airs live financial content streamed live on TFNN.com and TFNN's YouTube channel with Tiger TV live every market day from 8.30 a.m. to 4.00 p.m. Eastern for free each host is an experienced trader and gives their take on the market while taking calls and questions live from around the world from the moment the market opens until the closing bell sounds Tiger TV has eight different shows with expert hosts to help you make the right moves with your money watch online at TFNN.com or on TFNN's YouTube channel and become the investor you were born to be TFNN, Educating Investors Everything in the universe is governed by the Fibonacci sequence this mathematical principle is responsible for everything from the most aesthetically pleasing artwork to patterns in the stock market to stay on top of stock patterns you can take advantage of sign up for the Fibonacci 24-7 newsletter at TFNN.com When you subscribe you'll get a weekly report from veteran day trader Larry Pezzavento on stocks you need to pay attention to and you can trust Larry's analysis after all he's got 45 years experience as a day trader Larry will also provide daily charts videos and data on the key markets that he's tracking expect notifications from Larry on market movement you need to act on at any time first time subscribers also get a 30-day money back guarantee if you're not satisfied let us know and you'll get a full refund within 30 days of signing up subscribe to the Fibonacci 24-7 newsletter today TFNN.com Educating Investors and bear ETFs China A shares in either direction visit Direction Investments.com today an investor should consider the investment objectives, risks, charges and expenses of the direction shares carefully before investing the prospectus and summary prospectus contain this and other information about direction shares to obtain a prospectus or summary prospectus please contact Direction Shares at<PHONE_NUMBER> the prospectus or summary prospectus should be read carefully before investing and the funds is subject to risk including the possible loss of principal the funds are designed to be utilized only by sophisticated investors such as traders and active investors distributor foreside fund services LLC this program is brought to you by Vista Gold traded on the NYSE American and TSX under the symbol VGZ and welcome back to the Wall Street Money Hour this is Wall Street Manager your host Peter Bruno and before the break we were talking about various strategies of dividend capture in addition to dividend capture which we're trying to do for Lowe's Home Depot becomes a stock that we don't want to buy, we don't want to buy Home Depot if it got down to 290 and we want to buy Lowe's if it got down to 197 or lower now the stocks that we've mentioned within our portfolio are somewhat high priced stocks basically with the no commission basis of many brokerage firms today it's not necessary for you to buy 100 shares of stock or 1000 shares of stock you can buy 1 share of stock in your portfolio 10 shares of stock in your portfolio if you don't have enough money but I like buying these high priced stocks because you get the swing out of these stocks that we're looking for in order to they trade them into profitable positions however you don't have to buy 100 shares of the stocks that we talk about you can buy as many shares as you like depending on the amount of money you have in your portfolio now there's new things that has come up which are called leverage single stock ETFs they're ETFs of one stock and they're leveraged that means that instead of buying here an example on our screen we show Tesla and Tesla is not a stock that we're considering but right now Tesla is down $3 it seems to be midway between our support and resistance and our oscillator the fact is that if you were crazy about Tesla and you wanted to buy Tesla stock because you believe in Elon then you could buy Tesla stock but instead of buying 10 shares at $257 a share you can buy a single stock ETF of Tesla and it would only cost you $16 in 10 cents look at the the chart between TSLL and look at the chart between TSLA looks the same so if Tesla stock is going to move up to $18 a share let's say you're moving up from $16 to $18 as opposed to buying Tesla stock at $257.50 having it to go up to $275 so there are a group of single stock ETFs they're getting pretty popular they all leverage so it is risky but the fact is that right now based on pre-market research in addition to Tesla you have NVIDIA which is a single stock index you have PayPal PYPL, you have Nike and KE and you also have Pfizer PFE and if you happen to like any of those stocks rather than assuming that you have to buy the actual stock itself you can buy these leverage ETFs based on our cycle analysis and our cycle analysis works just as well with the single stock ETFs as they do with the individual stock ETFs so going through this chart now as we did before we see that now seems to be moving up Adobe seems to be moving up from support market still waiting for it to settle Microsoft certainly moving up from its support level American Tower we were thinking of using that for a dividend capture today because on American Tower the dividend is in about 10 days however today the market moved up $0.08 so therefore too late for us to buy that as a dividend capture Visa is at $234.55 when Nike was on the program last Friday we talked about looking to sell Visa at a certain point which was in our portfolio and I'm not sure what that price is right now but if Visa continues to move up we certainly get a chance to execute that trade is another stock that has support and we're watching carefully and Dollar General is another stock that has support that we're watching carefully so what we do as research overnight is go through our various patterns and looking for opportunities of buying any stocks that have an opportunity of moving from the support level to a resistance level and once we identify a list of these stocks then Megan does an analysis based on our algorithmic trading and our AI and trying to identify the best prices that we can buy these stocks at as I mentioned the $197 that we talked about for Lowe's and looking at Lowe's stock today the Lowe today was $196.46 I don't know how long the market was trading at the opening before it got down to $196.46 but if we were paying attention we probably would have sent out an action alert to our subscribers saying to buy the stock under $197 as I mentioned earlier at the Home Depot we want to buy that stock at $290 and right now it's $295.18 but guess what, the Lowe today was $289.68 so if we were sending out an action alert first thing in the morning certainly we would have bought that stock and once TFNN is able to post our Wall Street Money Letter up on their website once listeners are able to subscribe we update weekly market analysis every Monday prior to the opening and I'm pretty sure betting you a dollar to a box of donuts that we would have had by signals for Home Depot and Lowe's in today's update weekly market analysis but unfortunately they're close to our Wall Street Money Letter up on their website and I guess we have to wait for the next opportunity of sending out A, weekly market analysis and B, an action alert based on the opportunity of the listeners deciding to take advantage of our 30-day risk-free trial and if that's the case then you'll be getting our action alerts and you'll be getting the weekly market analysis and update based on our cycle analysis okay so that's where that's where we are as far as the here Lowe's the way I receive the information about Lowe's is we looked up here under diffident.com and Lowe's suggested that it's been paying $1.10 it's been paying $1.10 basically every quarter okay so there's no thinking that it's not going to be paying $1.10 excuse me okay so these are the strategies that we use for our subscribers and stay tuned so we'll be right back in a second you might think that if you want to be successful at trading in the stock market you're going to need a crystal ball after all it's impossible to predict the future right? like any endeavor in life before you decide it's impossible get some advice from the experts you might find that it's not so impossible after all for daily market overviews that give you direction on the key indices selective stocks and commodities subscribe to the opening call newsletter at tfnn.com the opening call newsletter is written by Basil Chapman creator of the trading methodology known as the Chapman Wave the Chapman Wave up-down sequence gives you an edge in identifying price turns finding the peaks and valleys in stock prices get the opening call newsletter by Basil Chapman in your inbox every day first time subscribers also get a 30 day money back guarantee if you're not satisfied let us know and you'll get a full refund within 30 days of signing up at tfnn.com educating investors everything in the universe is governed by the Fibonacci sequence this mathematical principle is responsible for everything from the most aesthetically pleasing artwork to patterns in the stock market to stay on top of stock patterns you can take advantage of sign up for the Fibonacci 24-7 newsletter at tfnn.com when you subscribe you'll get a weekly report from veteran day trader Larry Pezzavento on stocks you need to pay attention to and you can trust Larry's analysis after all he's got 45 years experience as a day trader Larry will also provide daily charts videos and data on the key markets that he's tracking expect notifications from Larry on market movement you need to act on at any time first time subscribers also get a 30 day money back guarantee if you're not satisfied let us know and you'll get a full refund within 30 days of signing up you can subscribe to the Fibonacci 24-7 newsletter today tfnn.com educating investors tfnn has launched the Tiger's Den hosted at Discord tfnn has been educating traders for more than 20 years with live programming hosted by a variety of professional traders during market hours the Tiger's Den available to all tigers and tigers for just $1 for the year there's no cash or added costs join our community of traders sign up today and become a part of this educational community of traders just visit the front page of tfnn.com catch Tom O'Brien professional trader and educator founder of tfnn also a special guest on CNBC Tom will bisect and dissect the markets the Tom O'Brien show next on tfnn back to the Wall Street Money Hour this is your host Peter Bruno and prior to the break we were talking about the single stock ETFs and I failed to mention that in addition to the buy side of these stocks they also have inverse ETFs for example Tesla which was TSLA and TSLL for the long Tesla stock they have TSLQ which is inverse so if you think Tesla is going down you can buy the inverse Tesla of TSLQ and if Tesla stock goes down that stock would move up and the same with the other stocks I mentioned I suggest that you investigate yourself by going into Google for a single stock ETF so you can see the type of companies that have single stocks ETFs including one of the advertisers on TFNN which is direction shares they have their own single stock ETFs as well although I'm doing the radio program every once in a while I'll have a guest on like my granddaughter Megan who was on Friday and my daughter Ellen Ramsey would be guesting some time to join us and just say hello and to talk a little bit I'm the host so therefore you have my information here about meet the members of the Wall Street Money Letter however this is Megan and Megan we have her information about her background and I mentioned earlier yesterday that she graduated three years of her college passes in two years and now she's taking her clinical psychology into advanced studies and she wants to be a clinical psychology therapist and that's great and although I want her to follow my footsteps I just want to make sure that she knows how to manage her money once she makes a lot of money I see that this is the end of our program thank you so much and I'll see you soon


Which app pays more? Rode or free? It's time to be great. Decay it on back with another video. If you're at home, put me on your video. And if you're in the car, put me on your stereo. Turn me up on the stereo, baby. Today we're gonna find out which app pays more? Rode or free? And I'm just gonna do it. I'm not gonna tell you guys the prices of the orders until the end of the video. So make sure you stay tuned in. It's time for us to get in. Our first order pickup is one door at Home Depot. We try to stack these chips like Pringles. Let's go. And just like that, we are here at Home Depot. We try to stack these chips like Pringles. They ain't even got this joint open yet. Guess what? It's six in a morning. Good morning. How are you doing? I have a Rode order to pick up. What's the order number? H, 19, 87. 87? Yeah, 87. 20, 18. OK, let me start over. H, 19, 1, 9, 87, 2, 0, 1, 8, 5, 6. Thank you. Y'all see what's going on. I have to put this joint, strap it in, so we can go out here and get it on. I know my nickname wrong. I'm not gonna microphone. Lay it down, lay it down. Place the door down, cover this joint up, so it doesn't get stressed up. We strap that up and stop. And just like that, we're going. It's time for us to pull up and get it on. Let's go. And just like that, we are here at the drop-off after we drop this off to let them not stay socks off. I actually came to this house before. Drop it right here. Laying back. Laying back like that. Joe, we are here getting dough. I'm gonna take this picture, then we gotta go. Step back, hit up the photo. We already know though. Smart. We're going. Order number two gets me what to do. Get some old money. The pickup location is low. I guess we're picking up another dough. It's time for us to pull up it. Skull, let's go. Just like that, we are here at low, so we can skull and get this dough. We're gonna come like Frisco. Ella, how you doing? I have a freight order to pick up. Do you have the order number or Marko? I have the order number. Okay. One zero zero. Nine zero two. Zero six zero. Two, four, four. Three, five, one, four hundred. A few moments later. Thank you very much. You guys have a great one. Y'all see what's going on, man? We got the dough. We're here to skull. We're gonna come like Frisco.  It's not heavy though. That's the good thing about it. It's super light. We're weighing 66 pounds. I'm gonna lean this back right here. Lay it down. You lay it down, lay it down, lay it down. Lay it down right here. Cover it up a little bit. Drap it down. Let y'all know when you're playing around. And just like that, it's time to hit the road so we can get our pockets on the floor. Let's go. We are here at the drop off location. I'm gonna see where they want me to drop the joint off at. I don't know if they got no dog in this zone. They don't look like it, but I'm shaking a little bit. Make sure it's going on. No. Open this door, Bill. Oh, they do got a dog inside. Hey, doggy. Hello, how are you doing, man? I'm here with your Lowe's order. A ver, mijo? Suki, doggy. It's a door, a Lowe's order. A door, like a door. Oh, yeah, yeah. A white door. Okay. Where would you like me to sit today? Downstairs in my garage. Okay. Okay. Okay, thank you. Right here. Oh, over here? It's okay right here? Yes. I'm taking a picture and I'm good to go. Is that back on the photo? It's back. Thank you. You have a great day. You too. So let's go ahead and get to these numbers. You know, I spit that hot thunder. The first order we did was on Rodey, Rodey, Rodey, with a demerit. The first order was on Rodey. Y'all saw us get that doggy. We picked up the door. We drove six miles for 46, 74. Y'all know we love getting that dog. And the second order was on Frey. We got to that money. We went to Lowe's. We got the door. We only drove two miles for $46. So from the numbers, it seemed that Frey is a better paying app. It seems that Frey is a better paying app for single orders like that. But I do want to tell you guys this. This is what I'm going to say. To me, it seems like that that was just only this single order. What I've always noticed about Rodey and Frey is that the Rodey app seems to pay more for single item orders.  And then Frey, Frey going to pay you more when you have more, like when you have more pounds.  This is this. I'm going to give you a secret. I'm going to give you a secret. Look, don't tell nobody about this. The only you should know, don't tell nobody else. Look, when you get those freight orders and the item or items weigh over 250 pounds, you are supposed to get an extra unload and load bonus. You're supposed to get more money for that. Now, only if it's 250 pounds and for a majority of the times they're not going to put it in the app. You have to reach out to them, let them know. This time you're going to find out. You're going to go in the app and you're going to, when you get the order, you're going to go down to it says services. If it's, once it says services under services, it's supposed to say load and unload. If you did not see load and unload under services, then that means that they did not pay you that extra money. So make sure you reach out to them.  That's the only thing they're going to do, baby. So like I said, it seems that freight pays more for heavier items. I noticed that like on a roadie app, when they give you like 1300 pounds, a whole bunch of salt bags and all that stuff, they're still going to pay you that same 46 to 48 or $54. They're going to still pay you that same amount. They're not going to up it because of the weight. Freight does up it because of the weight. So go out there and be great and don't hate. Now, I have some very important information for you guys, and I really appreciate every last one of you. We are over 75,000 subscribers. We are on our way to 100,000. And when we get to 100,000, we have a huge announcement to make too. So make sure you stay tuned and stick around and put your notifications on because we don't know when it's going to happen. It can shoot up to 100,000 in day now. So we never know. It just depends on the video of this drop and how they drop. Now, so if you've been around for a while, then you know that the reason why I got into gig work initially was pretty much to help people and also to invest.  Cause I'm a real estate agent. For those of you who don't know, I'm a real estate agent in Illinois and in Wisconsin. So my goal was to make money so I can buy a property and show people this is all possible. Now, I want to tell you guys this right now, pay attention to what I'm saying. And listen, if you guys have some spare money, just follow what I'm saying. As of lately, I've been heavy invested into crypto right now. I've been paying attention to crypto right now. And I know I pretty ain't been taking as much orders as I would like to take for as far as gig work and as far as the carrier company because I've been focusing on this crypto right now because for my guy of double M, my guy double M is Mark the mentor. I've told you guys about this channel many of times. He's saying that we're in a bull run super cycle, which means that everything is gonna go, I'm talking about berserk. Everything is about to go crazy. So if you have some spare money, I recommend that you go ahead and check out this channel. I've been telling you guys about channel this whole time. I'm not telling you, I'm not promoting his channel. You know, some people just trying to promote him channel.  You ain't gotta listen to it. Hey, don't listen to me if you don't want to. So just like you guys come to my channel to find out about gig apps and the Sprinter van and the carrier companies and all that different stuff, I also need to find out information too. And I like to learn, I always like to learn new things. So initially I went to Mark channel to learn about cargo van and box truck content. But after a while after some time, he started talking about cryptos and all this stuff. So I'm like, he been investing in crypto. For those who know, you already know I had already had a Bitcoin from back then. I had the Bitcoin, I had some Ethereum's, I had some XRP's, I have a few different stuff that I invested in over time. Like back in 2021 I started, or 2020, yeah, 2021 I started. So then he was like, yeah, I want to start doing some investment strategy videos. These investment strategy videos are only to members only, to MGMs. If you were part of MGM, you know what I'm talking about. It's only for the MGMs. And MGMs is a membership. It's only a part of that. If you're not a part of membership, you're not going to see the investment strategy videos in there. So in order to do so, if you have an Android, you are going to just hit join. You're going to put your information in there. It is going to be a feature.  But you have to go to tier two or to tier three. It's not going to be in tier one. So it's going to be either tier two or tier three is up to you which one you decide. You're going to hit join on the Android. If you have an iPhone, you're not going to be able to see the join button. If you have an iPhone, you have to go to a desktop or a laptop and then you can join that way. That's the way you're going to do it. Again, this is not a promotion. I'm just telling you what I did and tell you what I'm doing. You don't got to listen to what I'm telling you. You don't got to listen. Hey, I ain't going to lose no sleep.  So when I went on there, I started listening to what he's saying and I'm going to give you guys a backstory. This is what I knew I messed up, right? He had been sitting on his regular channel about this coin. I'm not telling you what coin to do your research. He had been saying about this coin, talking about this coin, this coin, this coin, he said, yeah, this coin, this coin. I'm like, man, guess what? Guess what happened? No, two coins, two coins, two coins, two coins, two coins. So I talked about this one coin when it was at 20 cent and he started talking about this other coin when it was at $20. Guess what happened? That one that was at $20, shout out to over $100 and I missed out on a lot of money. And once that happened, I was like, that's never going to happen again. So I'm just saying, you know right now, this up to you. You can do whatever you want to do. All right, look, I'll just give you some advice. I would recommend if it was me, what it is me, because I did what I did. Go ahead, go to Mark the Mentor channel, join the membership.  You're going to watch the investment videos. I'm going to put like a screenshot right there. You're going to watch those videos and he's going to tell you the cryptos and stuff that he's investing in. Now is the time to do it before it's too late because once it's going to be too late, it's going to be all on social media and all that stuff. It's going to be over with. The money's going to be made and it's going to be done. Look, I'm just trying to give you some advice. I'm just telling you what I did. It's up to you if you want to do it. You don't have to listen to me.  But this is only if you have extra money to spare. If you do not have extra money to spare, do not go get the membership. You're not going to invest in other, don't do none of that. If you have some money to spare and you're inter-investing, make sure you go do what I say out of the, hey, this is the only, this is the first and last time I'm telling you about this. I'm not saying anything about it, no more. With that being said, like I always tell you guys, make sure you do your own research. You can't rely on nobody else to make a decision for you. It's all on you. It's your money. It's your investment. It's your stuff.  So that's all I want to say. I hope you guys enjoyed this video. Again, if you're not subscribed, make sure you smash the subscribe button. Also, give me a thumbs up.  Throw them seeds up. Throw them seeds up in the comment section below. Y'all know we went out there to scope and pop like Crisco. I'll see you guys on the next one. Be going, be going, be flowing. You already know I'm in the DDK and I'm on my way.


Stand with your feet together, with your body straight, hands to your side.  Pull your shoulders back as well, downwards and back.  Now we're going to do straight punches, chain punches.


Hi, and welcome back to the program analysis course. So you're here in video number three of the lecture on data flow analysis. And what I want to do in this lecture is to provide more examples of data flow analyses that show how this general principle of a data flow analysis can be used to define how a static analysis is going to work. Here's an overview of the data flow analysis that you'll see in this course. So in the first video for this lecture, I had started by introducing data flow analysis by showing a concrete example, namely the available expressions analysis. And what we're going to do in this video is to look at three more examples of data flow analyses called reaching definitions, very busy expressions, and life variables. If this doesn't sound very clear at this point, don't worry, this is exactly what this lecture is going to show. And then in addition to what you see here in the lecture, there will be another kind of data flow analysis, namely one that is about attained analysis, which is what you'll implement in the course project. So everything you see here now in this lecture, hopefully, allows you to better understand what you're supposed to do in the course project, which is also about a data flow analysis. All right, so let's get started by looking at another kind of data flow analysis, and this will be a reaching definitions analysis. The goal of this analysis is what you see here. So for every point in the program, which again means before and after every statement, the analysis is going to compute which assignments may have been made and may not have been overwritten yet. So basically, that tells us what kinds of variables have been written to, and their value may still be what has been written to at a particular location, because they may not have yet been an overriding statement yet. So this can be useful in various kinds of program analysis, and in particular, this is useful to compute a so-called data flow graph, which tells us what kind of data may flow from one statement to another statement, because in this data flow graph, we want to have an edge that tells us, oh, what is written here may be used here, and this is exactly what a reaching definitions analysis is going to compute. Note the careful use of the words may in this statement of the goal of the analysis, because this is not about definite information that some assignment must reach use of a variable, but it's just about assignments that may have been made on some path that leads to a point in the program, and that may not have been overwritten. So it's not a guarantee that whatever definition reaches a particular program point is actually reaching this program point, but it's something that may happen. To make this more concrete, let's again have a look at an example. So in this example, we are writing into two variables, x and y, and then have this y loop that depends on the value of x, and then in the loop body, when we enter this loop body, it's going to write into y again, and then also into x. Now one of the reaching definitions that we have here in this piece of code is that the definition of x in the first line is going to reach the first statement inside the body of the y loop. And the reason is that there is a path where this assignment of x up here in the first line is still valid when we are reaching this statement down here, because there is no other assignment to x in between. Actually, if you look carefully at this piece of code, you'll see that every definition that is made in this piece of code. So all these four rights that have a box around them here, so the right into x, the right into y, and then the other two rights, also to y and x again in the body of the y loop, they all may reach this first statement of the body of the y loop, because there always is a path how to get from the assignment to this first statement in the body of the y loop without any other assignment to the same variable in between. In contrast, not every definition may reach the second statement of the y loop. So in particular, if you look at this definition up here in the second line where we are writing into y, then there's no way that this right can actually reach the second statement in the y loop, simply because the first statement in the y loop is always writing to y just before. So we know for sure that the definition in the second line is not going to make it beyond this assignment here, so it's in particular not a reaching definition for the second statement in the loop body. So now that you have an intuition of what the reaching definitions analysis is doing, let's define the analysis. And as we've seen in the second video of this lecture, you basically need to define six properties in order to define how a data flow analysis can compute, in this case, the reaching definition sets. The first of these six properties is the domain of the analysis, which tells us what things the analysis is propagating when it reasons about the behavior of this program. And in case of our reaching definitions analysis, the domain is the set of all definitions in the code, and the definition basically means an assignment, so every statement that assigns something into a particular variable. Formally, we will represent these definitions as pairs v comma s of variables and statements.  Then the second property we need to define is the direction of the analysis, and similar to the first example that we've seen earlier, this is a forward analysis, so we're propagating information in the direction of the control flow as it would happen when the code is executed. Property number three is the meet operator, which tells us what happens when two flows of control are merging, and in contrast to the analysis that we've seen earlier, we are here using the union operator, which means that if we have a branch and if we have a branching point and there are two branches where maybe here we have some set of reaching definitions and here we have some other set of reaching definitions, then once we are reaching the merging point, we take the union of these two sets of reaching definitions and then propagate that union further down. And the reason why we do this is because in the analysis, we care about definitions that may reach a program point, so we do not want to guarantee that they reach a program point, but just care about whether there is a possibility that they do it, and that's why we take the union of these two pieces of information. You could also define an analysis like this that takes the intersection and this would be another kind of analysis, but here we care about may information and therefore use the union. The next property that we need to define is the transfer function, which tells us how the analysis state, so the set of reaching definitions, is changing when reasoning about the execution of one particular statement. And similar to what we've seen earlier, we are defining the transfer function as a function that tells us what happens at the exit of a statement. So the RD here stands for reaching definitions. In terms of what we know about the analysis state at the entry of the statement, and in terms of two helper functions, kill and gen. So the overall equation looks very similar to what you've seen for the available expressions analysis, just that now this is about reaching definitions obviously the definitions of kill and gen are different here. So let's have a look at the definitions of these two helper functions gen and kill. So gen is basically creating new reaching definitions and it does so as follows. So if a statement S is an assignment and if it's assigning to a variable V, then gen of S will contain the pair V comma S, basically telling us that this statement is going to create a new reaching definitions that from now on we should propagate forward. And otherwise, so if statement S is not about an assignment, gen of S is simply DMT set because it does not generate anything new that the analysis should propagate. The kill function is defined as follows. So if S is an assignment, and again that's the only case that really matters for this analysis, and if it's assigning to a variable V, then kill of S will contain V comma S prime for all other statements S prime that also define the same variable V. So let's say we have an assignment to some variable called X somewhere and there's some other statements that also define this variable X, then kill of the first statement that defines S will include all the other statements by basically saying that, well these other assignments are not valid once we are reaching the statement that is now writing to X. And then again, if the statement is not an assignment, kill of S is simply DMT set because all other statements do not really matter for a reaching definitions analysis. The two remaining properties that we need to define in order to fully define this data flow analysis are the boundary condition and the initial values. So let's look at these two properties and let's start with the boundary condition. So because this is a forward analysis, the boundary condition is defining what happens at the entry node of our controlled row graph and intuitively what happens here is that all variables are still undefined. Now we do not yet have a notation to say that the variable is undefined because we always represent the definitions by the name of the variable and the name of the statement and to express the fact that the variable is still undefined, we're using a kind of special statement which is just called question mark that tells us that a particular variable is not yet defined. And now using this special statement, we can define the value of the, or the state of the analysis at the entry node as the set of pairs that contain every variable we have in our program combined with the special statement question mark by basically saying that all variables are still undefined. And then finally, we also need to say what will be the initial state at all the intermediate nodes and here we simply define it as the empty set by saying that all nodes before we know anything about them do not have any reaching definitions. So let me illustrate this idea of a reaching definitions analysis using the example that we've already seen before. So you just see the example code here again. And as usual, the first step for any kind of data flow analysis is to write down the control flow graph. If you want to practice your control flow graph creation skills a little bit, you may want to stop the video here and just try to draw it yourself. Otherwise you can also just watch me. So as usual, there's an entry node which is the beginning of this piece of code. And then in this case, we have these two assignments. One where we write five into X and then the other one where we write one into Y. And then we have this loop. So at the beginning of the loop, we're going to execute this conditional that checks whether X is greater than one. And it may be that this condition is wrong, which if you look at this code, of course, it won't be, but statically, we do not know about this. So we consider this edge where we go directly to the exit node. And then if we enter the loop, there will be these two more assignments, one that assigns the result of X times Y to Y. And then right after that, we have another one where we are writing X minus one into X. And then once we are done with that second statement in the loop body, we're going back to the conditional of the loop to decide whether we are going to iterate one more time in this loop. And now let's write down the results of the gen and kill functions because it's kind of the helper, these are the helper functions that we need to compute first in order to perform the actual analysis. So as for the first example that we've seen in the first video, let's do this for each of these statements and let's just again label each of these statements with a number. And then what we're going to do for each of these is to write down gen of S. And kill of S. So let's start with the first statement. This first statement is performing an assignment and that means that it's producing a definition, namely the one where we are defining variable X at statement one. So this is represented as this pair X comma one. The statement is also killing something because whenever you are defining a variable, you're killing all other assignments to this variable, no matter where they are in the program. This includes the assignment itself. So this is, it's killing itself, which technically doesn't really make a big difference here, but and also doesn't hurt and it just keeps the definition of kill a little bit shorter. So it's killing X as defined in statement one. It's also killing the definition of X at statement five. So X comma five. And it's also going to kill this definition of X at this artificial helper statement question mark that we have introduced earlier, which basically means that it's removing the information that X is undefined. Now for statement two, it looks pretty similarly.  So gen of statement two will contain this pair Y comma two because Y is defined as statement two. And then we are killing all definitions of Y at other statements, which in this case means at statement two with statement four and at this artificial question mark statement, meaning that X is not undefined anymore. Statement three does not contain any assignment, which means that both the gen function and the kill function are empty, which basically means nothing changes when we are propagating information across that statement three. Statement four is an assignment. So it is generating something. Let me defect that at statement four, we are writing into variable Y. And because we do this, it's also killing all other assignments to variable Y, which is the same set that we've already seen above. We have basically every other place, including this artificial question mark statement where Y maybe written is included in the kill set. And then likewise for statement five, we are writing X here. So this is going to be in the gen set. And then the kill set will contain all definitions of X, including the one at line five, statement five. So next we're going to write down the data flow equations again, which basically describe how the state at the entry and at the exit of our five statements is going to be computed. So we do this for every statement and for each of them, we are writing down RD for reaching definitions, entry and RD exit. So let's get started with RD entry of statement one. And this is something we had defined in the boundary condition where we had said initially for every variable, we assume that it's written or defined at this artificial question mark statement, which basically means that these variables are not yet defined. So this is what we say here. And then the next entry sets, for example, for statement two are always defined in terms of the incoming statements. So if you look at the control flow graph for statement two, the one that is incoming is statement one. So this equals RD exit of statement one. Then let's look at the entry set for statement three, where we have to look at the incoming statements of statement three. Statement three has two incoming statements, namely statement two and statement five. And now we have emerging points. So we need to look at our meter operator, which in this case is the union. So we're saying that the result of RD entry of statement three is RD exit of statement two and the union with RD entry, sorry, RD exit of statement five. And then for statement four and five, there's just one incoming statement each time. So RD entry of four is equal to RD exit of three and RD entry of five is equal to RD exit of four. So now we have defined the entry sets. Let's now have a look at the exit sets. So RD exit of each of these statements starting with one. This is the result of applying the transfer function, which says that we should look at what flows into this particular statement. So in this case, RD entry of one. And we should then remove everything that is killed by this particular statement. So we need to look at the kill set of statement one, which we have computed here in this table. So it's all these assignments two variables X. So we need to write this down here. And then after having removed everything that is in the kill set, we also need to add something. And this is everything that is generated by this statement. So again, going back to our table, statement one is generating X comma one because it's assigning two variable X, which means we are adding to this set that we have right now here this pair of X comma one. RD exit of statement two looks very similar to what we've seen above, just that it's now all about the definitions of variable Y. So I've just written it down here and you can confirm yourself that this is actually correct. Then we need to look at RD exit of statement three, which is very simple. For the simple reason that statement three does not have any assignment and therefore the kill and gen sets are both empty, which means that RD exit of three is exactly the same as RD entry of three. And then we move on to RD exit of four. And again, this is kind of the same story as for RD exit of one and two because we take the entry set for that statement, remove everything that is in the kill set and then add everything again that is in the gen set. So fast forwarding a little bit, this is what we'll get. So for every RD exit of a statement, we now know how to compute it based on the RD entry, which is actually missing here, based on the RD entry of that statement and the kill set and the gen set that we have computed for that statement. Once we have defined all these equations, then the question is again, what are actually the concrete RD entry and RD exit sets? Because right now these equations just depend on each other. And again, in order to find the concrete solutions, we need to compute it by basically putting these equations into each other until nothing changes anymore. And I'm going to show you a subset of the result of this computation of the solutions and I'm leaving the rest as a little exercise for you to try to do yourself and then feel free to, for example, exchange the solution through the Ilyas forum so that you can see whether it's correct or not. So what we'll get at the end would be something like this where for every statement, we are going to compute the final RD entry and RD exit set. And just to give you parts of this solution, so for example, the RD entry set for S will be exactly what you see on the left where we say that at the entry of this very first statement one, exit Y are both undefined. So this is the entry set. And then at the exit of this statement, X will be defined. So X is now has now a reaching definition from the statement one itself whereas Y still has this artificial reaching definition from the undefined question mark statement. For statement two, it's relatively similarly. So I'm just omitting it here. And again, this is a little exercise for you to try at home. For statement three, let me just give you the entry set. So the entry set here will be X defined at one, Y defined at two, Y defined at five, and also X defined at five. And actually Y should be defined here at four. All right, then the exit set is state in three. I leave as an exercise, same for the entry and the exit of statement four. And for statement five, I'm just going to give you as a little hint, the exit set, which is saying that Y is a reaching definition from its assignment at statement four and X is here because of the assignment at statement five. All right, so now you've seen two examples of data flow analysis, namely available expressions and reaching definitions. And what we're going to do in the following is to look at a third example called the very busy expression analysis. The goal of this analysis is to compute for each program point a set of expressions that must be very busy. And very busy here means the following. It means that on all future program paths, so basically on all paths that may happen after this program point, the expression will be used before any of the variables in the expression are redefined. So what this essentially means is that there is a point in the program where you know that some expression will certainly be used afterwards and that the values used in this expression will not be changed in the meantime. And that's something that a compiler can use for program optimization. And in particular, compilers use this kind of property for an optimization called hoisting. So what hoisting means is that you're basically taking a statement that is, for example, inside a block and then you're moving it outside of the block, you're hoisting it out of the block, which essentially means that the code is going to pre-compute something before it's actually needed. But you can do this if you know that this expression is very busy, meaning that it will certainly be used. So this pre-computation will not be wasted. And sometimes it's more efficient to compute something a little bit earlier because then the following computation either does not have to wait for the value being computed or it maybe doesn't have to repeatedly compute that value because you do it once at the very beginning instead of doing it repeatedly again later. So let's have a look at a concrete example. And in this concrete example, we have an if-then-else statement where depending on some condition, we either write some values into X and Y or write some values into Y and X. And now the interesting bit in this example is that there are some very busy expressions here, namely these expressions B minus A and A minus B. And the point where they are very busy is right here where this arrow is pointing. So right before we are entering either the then branch or the else branch. Because already at this point, no matter which of the two branches we are going to enter, we know that these two expressions B minus A and A minus B will be used and that none of the values used in this expression, so neither A nor B, will be redefined in the meantime. Now let's define this analysis and as before we need to go through these six properties that define a data flow analysis. Property number one again is about the domain of the analysis. So the kind of things that the analysis is reasoning about. And in this case, the domain is similar to the first analysis that we've looked at the set of all non-trivial expressions that occur in our code. Now the direction of this analysis is different from the examples that we've seen before because now this is a backward analysis, meaning that we start at the exit note of our control flow graph and then propagate information backward, so against the usual flow of control. Property number three is about the meet operator, which is basically telling us what happens if two control flows are coming together and what we're going to use here is the intersection operator and the reason is that we care about very busy expressions that must be used, so we wanna be sure that they are guaranteed to be used at some later point and therefore we're computing the intersection. So intuitively if there is a branch somewhere and then in one branch an expression is used and in the other one it's not used, then when we propagate information backward, which we're doing in this analysis, then we only wanna consider this expression to be very busy if it's actually used in both of these branches. The next property we're defining is transfer function where again we're defining what happens at one side of the statement as a function of what happens at the other side of the statement, but now because we have a backward analysis, things are the other way around. So basically here we're defining what happens at the entry of a statement. So this VB stands for very busy and this is the entry as a function of what happens of the analysis state as we note at the exit of the statement and then minus whatever gets killed by the statement plus everything that gets generated by the statements. So it looks very similar to the transfer functions that we've seen in a forward analysis but the big difference is that entry and exit are basically reversed. So these helper functions gen and kill have basically the same intuition as in the previous analysis. So gen is returning things and our case expressions that are added when we propagate through this statement and kill is returning statements or sorry, expressions that are removed when we propagate information through statement S. So more precisely gen of S will contains all the expressions that appear in a statement S and the intuition here is that whenever an expression appears in a statement S that means that this expression is actually used in the statement and therefore when we go backward it may actually be one of these very busy expressions. And kill of S looks at assignments because the intuition here is that we want to kill any expressions that are not valid anymore because some of the variables that are used in the expressions in the expression is assigned to. So if our statement S is assigning to some variable X then kill of S will return or will include all expressions in which this variable X occurs. And otherwise, so if this statement is not an assignment then kill of S is simply the empty set. And finally we again need to look at the boundary conditions and the initial values of intermediate nodes. So the boundary condition here is for the final node because this is a backward analysis. So the analysis starts at the exit node of the control flow graph. So we need to define the VB exit set at this exit node of the final node. And here we define this as the empty set because at the exit node there's no expression that we know to be used after that. So we start with the empty set. And for the intermediate nodes we also don't know anything about expressions that will be used after them at the very beginning. So we also start by basically having the empty set of no very busy expressions at all as the initial state of all intermediate nodes. So let's illustrate this with our code example again. And as usual, let's start by drawing the control flow graph.  So as usual, we are starting with an entry node and as usual, somewhere we'll have an exit node which is for the end of the piece of code that we have here. In this example, because we start with an if, the first thing that is going to be executed is this conditional of the if. So this check whether a is greater than b. And then we have these two branches which are represented by two outgoing edges where in one of them, we're going to assign b minus a to x. And then after we've done this, we have another assignment where we are writing a minus b into y. And once we are done with this, we are done with the whole code and go to the exit node. And in the other branch, the else branch, we also have two assignments but they look a little differently. So here we are going to assign b minus a to y. And after that, we'll write a minus b into x. And again, once we're done with this, we are also going to reach the exit node. So given this control for graph, the next step again is to compute the gen and kill sets that we'll use as helpers in order to compute the actual transfer functions. So we're going to do this for each of our statements here. Well, for each of them, we are computing gen of s and kill of s. Let me just label these statements. And then for each of these, we want to compute these two sets now. So to do this, let's start with statement one. So statement one is not using any expression and therefore it's also not generating anything. And because it's also not assigning to any value, its kill set is also empty. Statement two is actually using an expression. So it may generate or it does generate this busy expression b minus a. And because it's not assigning to any variable that is used in any of our non-trivial expressions, the kill set is also empty. So the kill set could contain x and if we would do this in a more complete way here, we would also write down x, but actually x doesn't matter because x is not a variable that is used in any of the non-trivial expressions here.  Okay, then statement number three is also using an expression, namely a minus b. So this is something that will be in its gen set. And again, it's not killing anything because it's neither writing to a nor to b. And then for three and four, things look very similarly. So statement, sorry for four and five. So statement four is using b minus a and again is not killing anything. And statement five is using a minus b and again is not killing anything. So now the next step would be to write down the data flow equations again because we've done this already two times now and because you can probably do it yourself from the formulas that I've given you on the previous slides. I'm not going to do this again, but what I'm going to show you here is the solution of these data flow equations. Where basically for every statement, we're going to have this set vb entry of s and the other set vb exit of s. And we want to do this for all our five statements again. In principle, once you've written down the data flow equations, it doesn't really matter in which order you are computing the concrete values for vb entry and vb exit. But because this is a data flow analysis that is computed backwards, I'm going to sort of go backwards through this code. So by doing this, let's start with the exit sets of statements three and four, which are these two statements that are yeah, at the end of the respective branches. So just before the exit block and because we start at the exit block with an empty set of very busy expressions. This basically means that the exit sets of statements three and four will also be empty because we're just propagating the empty set up in our control flow graph. Then looking at the gen and tilt sets of three and four, we can see that they both will add the expression a minus b to the set of very busy expressions. So here we will then have that set and the same for statement three. Then next we can look at statements two and four, where from the entry set of statement five, we do know what the exit set of statement four will be by basically just copying it over. So this will be, oops, sorry, a minus b again. And then we can look at what statement four itself is doing and it's essentially adding another expression to what is coming in here. So we have a minus b and then because it's also using b minus a because that is an expression that is in its gen set, we are adding this here into the set VB entry of statement four. And very similarly, we do the same for statement two, where we look at what is the analysis state at the entry of statement three. This is this one expression a minus b, which we propagate backwards into the exit set of statement two. And then statement two generates something on top of that. So now we will have not just a minus b, but also b minus a. And statement one is kind of interesting because here we have a point where control flow, if you look at it backwards is merging. So actually this is a branch, but if you look at it backwards, the flow is merging here. So we need to look at our meat operator, which says that we should compute the intersection of the two sets that are coming in here. The two sets come from statements two and four. And both of them contain the same set, which is the set of a minus b and b minus a. So the intersection of these two sets still contains these two expressions. And then because statement one does not generate or kill anything, what we'll have here at the entry of statement one is the same set of a minus b and b minus a. Cool. So now you've seen three examples already of data flow analysis. And in the remainder of this video, I wanna show another one, which is called live variables analysis. So what's the idea of live variables analysis? It is that we want to compute for each statement the set of variables that may be live, where live means that a variable is used before being redefined. So essentially what we wanna know here is, can a variable that is around at this statement be actually be used later on at some point that happens after the specific statement we add? And this is a very interesting analysis, for example, to identify dead code. So dead code is code that is useless and could be removed from a program without really changing the semantics of the code. And this is useful for two concrete applications. One is bug detection. So if you know that there's an assignment somewhere, but there's no way that the variable that is assigned to is ever going to be used anywhere, then probably the code is not in the state that developer intended. For example, because you've maybe written to the wrong variable, or maybe you're using later on a wrong variable that you actually wanted to not use. And even if there's not a bug, then it's also interesting for optimization because if you know for sure that there is some assignment that is not used anywhere later on, then you can remove this dead code and speed up the program by doing this. And in order to do this, you first need to compute this set of live variables and this is exactly what a live variables analysis is doing. So let's illustrate this idea using a concrete example again. And in this example, we have a couple of variables X, Y, and also Z. And then we have an if somewhere where we are going to define some of them depending on some condition. So if you start with the first statement, then here we can say that X is actually not live after this first statement, which means that there's no path that the program can take after that statement where this assignment of X really matters because the only thing that happens next is another assignment to X. And there's no use of X in between because the only statement in between is not using any other variable or at least it's not reading any other variable and in particular it's not reading X. In contrast, at the end of this statement here, the third one, both variables X and Y are actually live, which means that both the value of X and the value of Y that we have defined last at the end of that statement will be used or may be used in some path that comes after that statement. And in particular here, they are used at this in the conditional of this if because we are reading X and Y in order to decide which of the two branches to take. So in terms of what a compiler could maybe do or what a programmer should maybe do with this code, we now know that this first statement here which assigns two to X should or could easily be removed because it's not really needed, it's actually dead code. So now that you've understood the intuition of the analysis, let's again define it. And again, we do this by defining these six properties that make up data flow analysis. So first we need to define the domain and here the domain of the analysis is the set of all variables that occur somewhere in our code because each of these variables could potentially be a live variable. The analysis is implemented as a backward analysis because intuitively we look at where variables are used and then we propagate these backwards to figure out at what point the variable is live. The meter operator here will be the union operator and the reason is that we care about whether a variable may be used. So if you have two branches and on one side it may be used on one side it is used on the other one it is not used and if you propagate this backwards then we wanna keep this information and propagate backwards the fact that this variable may be used in at least one of the two branches and therefore the meter operator here is union. Next we're designing the transfer function which again looks very similar to what we've seen earlier. So we define one thing in terms of what happens on the other side of the statement minus the kill set of the statement plus the gen set of the statement. And again because this is a backward analysis note that what we're computing here is the state at the entry of a particular statement given the state at the exit of that statement. So we assume we know what happens or what the state is after the statement and then propagate backward through the statement to compute what the state will be at the entry of that statement. So the sets that are given here as LV exit and that are also then computed as LV entry are subsets of the domain of the analysis. So they will be sets of variables that are live at a given statement. This definition again relies on the two helper functions gen and kill. And in this case gen returns all the variables V that are used in the given statement S because whenever a variable is used then looking backward it may be live somewhere. And kill of S looks at assignments. So if S is actually an assignment and this is an assignment to a variable X then this will kill the variable X because we know that after an assignment to X or actually before an assignment to X the uses that come afterwards do not really matter anymore. And if the statement S is not an assignment then kill of S is going to return an empty set. Finally we need to define the boundary condition and the initial values. In this case because this is a backward analysis defining the boundary condition means that we need to define what the live variables are at the exit of the final node. And here what we say is that this is the empty set because we do not know anything about variables that are going to be used after the final node. So we can only say that to the best of our knowledge there are no live variables at this point. And the same is true for all intermediate nodes. So we initially assume that all intermediate nodes have no live variables until of course we propagate information through them after which they of course may have some live variables. So now let's put all these definitions in use and let's actually apply them to the example that we've seen before by computing the live variables for the statements that we see here in the code. And I would like you to actually do this yourself. So ideally please stop the video at this point and then try to use the machinery that you've now seen in this lecture so far to compute the live variables before and after every statement that you see here in the code. So without going into all the details how to compute it because we've done this now a couple of times let me just show you the solution that you should have found. So for each of the statements and I'm just numbering them in the order in which the lines appear here in the code. So we have one, two and three for the first three statements before the if then we have number four which is the conditional of the if, number five which is the assignment that happens in the then branch and then six and seven which are the two assignments that happen in the else branch. And now for each of those you should have computed LV entry of the statement and LV exit of the statement. And what you should have found here is the following. So let me start from the end because this is a backwards analysis. So you should have found that at the exit there's no live variable that's by definition then at the entry of statement seven we have Z as a live variable because statement seven is actually making use of this variable. In statement six we can then propagate this backwards by having the same set with Z as a variable as the exit of exit set of statement six. And then because statement six is writing to variable Z it's killing this variable but at the same time it's using another one. And so we will add this other variable namely Y to our live variable set here. The things look similar on the then branch where at the exit of statement five we have the empty set but then statement five is using variable Y. So we have this here. And then if you propagate things backward we reach statement four where we take the union of what we have in these two branches which gives us the union of the set of Y and the set of Y which is the set of Y. And then in statement four another variable is used on top of Y and this is variable X. So here we have X and Y and Z. And then from statement four and we can propagate this further backward where we have X and Y here at the exit of statement three because statement three is writing to X it's killing X so only Y remains here. And this propagates to the exit of statement two but statement two is assigning to Y. So this is actually also killed. So we have only the empty set left here and then this is what is propagated further back until we reach the entry node. All right, so this brings me to the end of this video. You've now seen a lot more examples of data flow analysis and I hope this overall idea of the data flow analysis framework has become a bit more clear. What we'll do in the remaining videos is to look a little bit more into how these data flow equations that you've now seen a couple of times are actually solved and then how to extend this whole idea to for example, not only looking at the code in a function but also into multiple functions. Thank you very much for listening and see you next time.