首页  >>  来自播客: Joseph Wang 更新   反馈

Markets Weekly October 21, 2023

发布时间 2023-10-21 20:13:10    来源
Hello, my friends. Today is October 21st. My name is Joseph and this is Markets Weekly. Now, this week was another exciting week in global markets, so we have a lot to talk about.
大家好,我的朋友们。今天是10月21日。我叫约瑟夫,欢迎来到本周市场周报。本周是全球市场再次充满激动的一周,我们有很多话题要讨论。

First and foremost, we have to talk about Treasury yields. This week, like many weeks before it, Treasury yields trended higher. The 10-year Treasury yield touched 5% before retracing, seemingly on account of geopolitical concerns. Now, many people are looking at this and wondering, just when will it stop? Well, one way it could stop is if a very important actor, like the Fed, would put a stop to it. This week, we got some information on how the Fed is looking at this, and it seems like the Fed is blessing this rise in longer dated yields.
首先,我们必须谈谈国债收益率。这个星期,就像之前的许多星期一样,国债收益率持续走高。10年期国债收益率触及5%后回落,似乎是出于地缘政治的原因。现在,很多人都在想,这个趋势会什么时候停止呢?嗯,它可能会停止的一种方式是如果像联邦储备系统这样的一个非常重要的行为者出面干预。这个星期,我们了解到了联邦储备系统对此的看法,看起来他们对这种长期债券收益率的上升持认可态度。

Secondly, let's talk about the US households. So rates have gone up a lot, and we see a lot of doomer takes about how the US consumer and so forth are in dire straits. We have some good data from the Fed and from the big banks reporting the past week, and they seem to be sounding a very positive picture. Let's take a look as to what they're saying.
接下来,我们来谈谈美国的家庭情况。利率上升了很多,我们看到很多人对美国消费者等方面的困境持悲观态度。上周,美联储和大型银行发布了一些好的数据,他们似乎对形势报以乐观态度。让我们来看看他们都说了些什么。

And lastly, the Fed published their semi-annual financial stability report on Friday. Let's take a look as to what market participants report that they are concerned about and what the Fed staff are concerned about to see if they are now anything lurking in the near term.
最后,美联储在上周五发布了他们的半年度金融稳定报告。让我们来看看市场参与者报告的关切以及美联储工作人员关心的问题,以确定近期是否存在任何潜在风险。

Okay, starting with yields. So if you have been following my work for any amount of time, nothing, nothing that is happening in the markets should be surprising to you when it comes to yields. Yields are trending higher and they're going to go higher. So right now we have some geopolitical concerns in the Middle East, and you can see that playing out in gold, which popped notably on Friday. And yet despite all these geopolitical concerns, we still see the tenure yield around 4.9%. Now, I have no idea how politics would develop in the coming weeks. But if for whatever reason, tension, let's say, tones down, you can imagine that that flight to safety, but it's not going to be a problem. If the Fed's going to be a problem, flight to safety bid gets unwound and can easily see the tenure yield above 5%.
好的,从收益率开始。所以如果你一直关注我的工作,市场上发生的任何事情对于收益率来说都不应该让你感到惊讶。收益率正在上升,而且将会继续上升。现在我们在中东地区有一些地缘政治问题,你可以看到黄金在上周出现了明显的上涨。尽管存在所有这些地缘政治问题,我们仍然看到十年期收益率在4.9%左右。现在,我不知道政治在未来几周将会怎么发展。但如果出于某种原因,例如紧张局势缓和,你可以想象人们会将资金转向安全避风港,但这不会成为问题。如果联邦储备会成为问题,资金流向安全避风港的倾向将会取消,我们很容易看到十年期收益率超过5%。

Now, in thinking about just when will it top. One way I find useful is to think about just, you know, who could step in to kind of make this stop. And of course, the elephant in the room in these cases is always the Fed. And when the Fed's going to be in the middle of the year, the Fed's going to be a problem where the Fed's going to be one of the first steps in the middle of the year, but it's not necessarily going to be a problem. But in the middle of the year, when the Fed's going to yield was going too high that they didn't like what they were seeing, they could do something about it. It doesn't necessarily have to be asset purchases. They could grow out of them. They just express concern or something like that and shift sentiment.
现在,考虑到它什么时候会达到顶峰。我觉得有一个有用的方法,就是考虑到,你知道的,谁可能会介入以停止这个局面。当然,在这种情况下,大象房间里的问题总是联邦储备系统。而且当联邦储备系统在今年中旬发挥作用时,它可能会成为一个问题,但并不一定会成为一个问题。但在今年中旬,当联邦储备系统的回报率过高而他们对此表示不满时,他们可以采取一些措施来应对。这不一定非要是资产购买,他们可以逐步削减。他们只是表达担忧或者类似的事情,改变投资者情绪。

Staff leave some commentary on tenure on treasury yields. So the Fed, of course, being schooled in standard economic thinking, when they look at longer-dated treasury yields, they decompose it into two segments. One segment is the expected path of policy, and the other segment is term premium. So for example, let's say the tenure yield is at 5%. Now, you can think of that as, well, part of that is the expectation of where the Fed, the path of interest rates, set by the Fed in the next 10 years. Now, part of that is just a little bit of risk premium, a little bit of extra return that investors are asking for in order to hold longer-dated yields. So by the Fed's calculation, they think that most of the increase will actually basically all the increase in longer-dated yields so far has been in term premium. So is the term premium really high or really low? Well, Fed staff, according to their calculations, they think that term premium is still historically very low. Now, this graph that they have here is as of September. And since September, now yields have gone up a bit. So it's going to be, so term premium has widened a little bit. But you can see that historically, from this perspective, term premium is still historically low. And that suggests that the Fed is OK with this.
员工对国库收益率的期限留下了一些评论。因此,当联邦储备系统(Fed)查看较长期限的国库收益率时,他们会将其分解为两部分。一部分是政策的预期路径,另一部分是期限溢价。例如,假设十年期收益率为5%。现在,你可以认为其中一部分是联邦储备系统(Fed)在未来10年内设定的利率路径的预期。另一部分则只是一小部分风险溢价,投资者要求在持有较长期限的收益率时获得额外回报。根据联邦储备系统(Fed)的计算,他们认为迄今为止较长期限的收益率增加大部分实际上都是期限溢价。那么期限溢价真的很高还是很低?储备系统(Fed)的员工根据他们的计算认为期限溢价仍然处于历史上非常低的水平。而他们此处提供的图表是截至9月份的数据。自9月以来,收益率已有一些上升。因此,期限溢价略有扩大。但从历史的角度来看,期限溢价仍然处于历史低位。这表明联邦储备系统(Fed)对此感到满意。

But of course, that's just this perspective of Fed staff. We got to hear from the big man himself. Now, Jay Powell gave a talk this past week that was televised on YouTube. And we got to hear some of his thoughts. Well, first off, how was he looking at the rise in, let's say, the 10-year yield? He says that it's tightening financial conditions, which is kind of what monetary policy is supposed to do. Let's listen now.
当然,这只是美联储工作人员的观点。我们还要听听这位大人物的意见。本周,杰伊·鲍威尔在YouTube上发表了一次讲话。我们听到了他的一些想法。首先,他对于10年期收益率上涨的看法是怎样的?他表示,这是在收紧金融条件,这也是货币政策所应该做的。现在让我们听一下他的讲话。

There are those who suggested, including some colleagues in the Fed, that maybe the bond market is doing part of your job for you. Is that the way you see it? Look, I would say it this way. The whole idea of tightening policy is to affect financial conditions that you'd extend higher bond rates that they do. They're producing tighter financial conditions right now. So that's how monetary policy works. That's literally how it works. OK, so obviously, we have the 10-year yield, let's say, up 50 basis points in a month. That's going to tighten the financial conditions. So if you are someone who wants to buy home and you're trying to get a mortgage, your mortgage rates have gone up notably. If you're a corporation, you're trying to, let's say, borrow on the market. Yes, the interest rates you have to borrow are higher. So boom, tighten financial conditions. That's obvious. Now, but is that something concerning to J. Paul? Is our financial conditions getting too tight, such as that he might try to push back against this relentless rise in longer dated yields? Let's listen.
有人建议,包括美联储的一些同事,也许债券市场已经为你的工作做了一部分。你是否也这样看?看,我会这样说。收紧政策的整个理念就是要影响金融条件,使得债券利率增加。它们目前正在产生更加紧缩的金融条件。这就是货币政策的工作原理。确切地说,就是这样。好的,显然,我们有10年期收益率,在一个月内上涨了50个基点。这将加紧金融条件。例如,如果你是想购买房屋的人,你想申请抵押贷款,你的贷款利率显著上涨。如果你是一家公司,你想在市场上借款。是的,你需要支付更高的利率。这就加紧了金融条件。这是显而易见的。现在,J. Paul是否对此表示担忧,金融条件是否过紧,以至于他可能试图反对这种持续上升的长期收益率?让我们听听他的观点。

So the evidence of your eyes is that the economy is handling much higher rates, at least for now, without difficulties. So notionally, that might tell you that the neutral rate is risen, or it may just tell you that we haven't had rates high enough for long enough. You're right, though. But we have models for everything. We have formulas for everything. Ultimately, as a practitioner, we have to focus on what the economy is telling us, even taking lags into account. What's it telling us? Does it feel like policy is too tight right now? I wouldn't have to say no. I think the evidence is not that policy is too tight right now. Well, it sounds like he's not really concerned. And maybe he's pretty happy that financial conditions are getting tight. After all, he's height rates to over 5%. And by all accounts, the economy continues to grow above trend. So from his perspective, financial conditions have it been super tight, maybe, and they're getting tighter. So it seems like things are going in a direction towards what he wants. So it seems like this move we see in Long Radio Deyodes has the Fed's blessing. Now, that being said, there are other actors that can try to push against this move, specifically the US Treasury. And I will write about that in my weekly blog post.
所以你的眼睛所看到的证据是,经济在目前情况下可以处理更高的利率,至少暂时没有困难。从概念上讲,这可能意味着中性利率上升了,或者只是说明我们长时间以来的利率还不够高。你说得没错。但我们对所有事情都有模型和公式。最终,作为从业者,我们必须关注经济所告诉我们的,即使考虑滞后性。它告诉我们什么?现在的政策是否过紧?我不得不说不是。我认为现在的证据并不表明政策过紧。嗯,听起来他好像并不担心。也许他对金融条件开始收紧感到很高兴。毕竟,他想将利率提高到超过5%。而且,根据所有的说法,经济继续以高于趋势增长。所以从他的角度来看,金融条件可能还算不错,而且正在变得更加紧缩。所以看起来事情正在朝着他所期望的方向发展。所以看起来我们在长期国债上看到的这种变动是得到了美联储的认可的。话虽如此,还有其他可以试图反对这种变动的利益相关者,特别是美国财政部。我将在我的每周博客文章中写到这一点。

OK, the next topic I want to talk about is the condition of US households. So as we all know, rates have gone up a lot. And how has that been affecting US households? Now, there are many people in social media who are talking about there's tremendous pain and suffering, huge delinquencies, and so forth. But those guys have been saying the same thing for two years, have been totally wrong, and are never going to get it. So how do we go about looking at this? Well, let's look at the data. So this past week, the Fed published two really interesting reports. One is to survey of consumer finances, something like that, which basically tells you about the income and net wealth of US households. And they also have the Financial Stability Report, which we'll talk about more later, that has a section on US households. And on top of that, we also got the earnings releases of a lot of big banks. Now, millions of people bank with big banks. They are at the center of household financing. So they have a really good picture as to how the US consumer is doing. Now, the overall picture painted by all this data is that the US households are doing well. Now, income data, let's say over the past three years from 2019 to 2022, we see medium real income up a little bit, not too much.
好的,我接下来想要谈论的话题是美国家庭的状况。正如我们都知道的那样,利率已经大幅上升。这对美国家庭有什么影响呢?现在,社交媒体上有很多人在谈论巨大的痛苦和苦难、巨大的拖欠等等。但这些人已经说了两年同样的话,而且完全错了,他们永远也不会明白。那么我们该如何去看待这个问题呢?嗯,让我们来看看数据。所以在过去的一周,美联储发布了两份非常有趣的报告。其中一份是有关消费者财务状况的调查报告,基本上告诉你关于美国家庭收入和净财富的情况。他们还有金融稳定报告,我们稍后会更详细地谈论,报告中有关于美国家庭的部分内容。除此之外,我们还获得了很多大型银行的收益报表。现在,数百万人与大银行有着业务往来,他们是家庭融资的中心。因此,他们对美国消费者的状况有一个非常清晰的印象。现在,所有这些数据所描绘的整体画面是美国家庭状况良好。关于收入数据,我们可以说过去三年,从2019年到2022年,中等实际收入有所增长,但幅度不大。

But what was really surprising to me about the survey of consumers from the Fed is that the median net worth of US households increased hugely just over the past few years. So US households are a lot wealthier today than they were a few years. And that wealth is largely due to the increase in home prices. So in the US, about 65% of the people own a home. And if you own a home, you've seen your home prices appreciate significantly. And home prices still are continuing to appreciate slightly. So overall, and yes, the rich cheaper are even more richer. So this impact is largest along the welfare spectrums. But even the median person is experiencing a significant appreciation and assets net worth is high. So incomes have risen over the past few years. And so real incomes have risen. And so have net worth.
但是,对我来说,在美联储对消费者进行的调查中,真正让我吃惊的是,美国家庭的中位净资产在过去几年内大幅增长。因此,与几年前相比,美国家庭的财富要丰富得多。而这种财富主要归功于房价的增长。因此,在美国,大约有65%的人拥有房屋。如果你拥有一套房屋,你会发现你的房屋价格有显著升值。房价仍在继续略微升值。因此,总的来说,是的,富人更富了。这种影响在福利范围内最大。但即使对于普通人来说,资产净值也有显著升值,资产净值很高。过去几年收入有所增加,实际收入也有所增加,资产净值也有所增加。

Now, what about how things are going today? So there's been a lot of talk about the rise in, let's say, auto loans delinquencies and the rise in credit card debt. Well, the Fed's financial stability report shows that, yes, absolutely right. Delinquencies in auto loans and credit cards has risen over the past few quarters. But if you look at the charts, you know that they've risen from very low levels. And overall, still remain within historical ranges. It doesn't look alarming at all.
现在,我们来说说今天的情况怎么样?最近一直在谈论汽车贷款违约率的上升以及信用卡债务的增加。嗯,美联储的金融稳定报告显示,没错,确实如此。过去几个季度中,汽车贷款和信用卡违约率有所上升。但是如果你看看图表,你会发现它们上升的起点非常低,而且整体上仍然处于历史范围内。看起来一点都不令人担忧。

Now, the deterioration is going to be a bit more in the lower credit spectrum, but it always is. That's why they're low credits. Now, I also want to make the point to stress this oftentimes. I hear people talking about these significant rise in credit card debt. Now, consumer credit card debt has definitely risen. But you have to realize that's in nominal terms. Over the past few years, you know, we've had an inflationary period, incomes of risen, house prices of risen, basically, all numbers have gone up.
现在,较低信用等级的恶化程度会更高一些,但这种情况一直存在。这就是为什么它们的信用等级较低。我还想强调一点,人们经常会谈到信用卡债务显著增加的问题。确实,消费者信用卡债务确实有所增加。但你得意识到这是以名义价值来衡量的。在过去的几年里,我们经历了通胀时期,收入和房价都在上涨,基本上所有的数字都在增长。

So when we look at credit card debt, we also have to normalize it a bit. Now, Jason Furman, great economist, has this really, really good graph that normalizes credit card debt by disposable income. And as you can see, once you do this calculation, the level of credit card debt is not at all alarming. There is nothing to be worried about. This is still actually on the lower end, historically.
因此,当我们看待信用卡债务时,我们也需要对其进行一定程度的标准化。现在,杰森·弗曼(一位杰出的经济学家)有一个非常非常好的图表,可以通过可支配收入来标准化信用卡债务。正如你们所看到的,一旦进行了这个计算,信用卡债务的水平并不令人担忧。没有什么可担心的。从历史上来看,实际上这个水平仍然处于较低的水平。

Now, for some extra data, let's go to the big banks. Again, we got a lot of earnings releases from the big banks over the past two weeks. What are they seeing in the consumer space? Well, at JP Morgan's, okay, JP Morgan, the biggest bank in the US, his CFO was asked this question. And the CFO basically said that I don't see consumer weakness, I don't see credit weakness anywhere, okay? So JP Morgan, again, big bank, tons of data has products everywhere throughout the country. They don't see credit weakness anywhere.
现在,我们来看一些额外的数据,让我们去大银行看看。在过去的两周里,我们再次从大银行得到了很多盈利发布。他们在消费领域看到了什么呢?好吧,在JP摩根的,让我们看看JP摩根,美国最大的银行,他的首席财务官被问到了这个问题。首席财务官基本上说,我没有看到任何消费者的弱势,我也没有看到任何信贷弱势,好吗?所以JP摩根,再次是一家大银行,在全国各地都有产品,他们没有看到任何信贷弱势。

Now, let's look over at Bank of America, another big bank. Now, Bank of America actually provided a special graph just to show you where they think things are, are historically. And you can see from both their commercial data and their consumer data that losses are historically low. And maybe normalizing a bit, but still low. Now, what about, let's say their credit card data? Of course, they have good data on spending. Well, it has definitely been moderating, but it's not declining. So what they're showing here is that consumers continue to spend, but their spending growth is at levels that are basically around where things were before 2020. Spending is not declining, as you would expect, in a recession, it's just basically normalizing. Things are landing softly. So the big soft landing that many people doubted over the past two years really does seem to be actually happening according to a wide range of data. Now, that doesn't have to, that could change, but so far over the past few months, it doesn't seem like there's anything really concerning going forward. And I would also note that banks, they have to have low loss provisions according to where they think, according to the losses that they expect to have. The banks have actually, notably, lowered their low loss provisions because they are not forecasting a recession anymore. So again, so far, things look good. Okay.
现在,让我们看一下美国银行,另一家大银行。实际上,美国银行提供了一份特殊图表,展示了他们认为事情在历史上的位置。从他们的商业数据和消费者数据来看,亏损历史上是很低的。可能有点趋于正常,但仍然很低。那么,他们的信用卡数据呢?当然,他们对消费支出有很好的数据。嗯,这肯定有所放缓,但没有下降。所以他们在这里展示的是,消费者继续消费,但消费增长水平基本上与2020年之前的水平相当。消费并没有像在经济衰退中预期的那样下降,只是基本趋于正常。情况正在平稳落地。所以,在过去两年中,很多人对于大幅降落的担忧似乎确实正在根据广泛的数据发生。现在,这种情况可以改变,但迄今为止,在过去几个月中,似乎没有什么真正令人担忧的前景。我还要注意的是,根据他们预计的亏损情况,银行必须有低的亏损准备金。事实上,银行已经显著降低了他们的低亏损准备金,因为他们不再预测经济衰退。所以再次强调,目前情况看起来不错。好的。

And the last thing we wanna talk about is what was in the Fed's most recent financial stability report, where we can talk about potential risks to the economy and to the markets going forward. So let's first talk about what the Fed staff thought were concerning, and then we'll talk about what they found out when they surveyed a whole bunch of people. Now, across the financial stability report, it was honestly very mild. There was really nothing that jumped out to me. I think what was most notable that flagged by the Fed staff is equity valuations and commercial real estate valuations.
最后一件我们想要讨论的是美联储最近的金融稳定报告中提到的内容,我们可以谈论一下经济和市场未来可能面临的潜在风险。所以首先让我们谈谈美联储工作人员认为令人担忧的是什么,然后再谈谈他们调查了一大批人后发现的情况。在整个金融稳定报告中,实际上没有什么特别引人注目的问题。我认为最值得注意的是美联储工作人员指出的股票估值和商业房地产估值。

So equity valuations. So if you're a traditional economist, the way that you look at this is you could compare equities to say, quote unquote, CFS, like US Treasuries. Now, this comparison is called the equity risk premium, which is basically according to this metric, how much extra return you're getting by buying equities. Now, the equity risk premium, the yields have gone up a lot. And so the expectation is that you're not getting a whole lot of extra return by buying equities. So equities are in that sense historically, maybe a bit overvalued.
因此,股票估值如此。如果你是传统的经济学家,你会用一种方式来看待这个问题,即将股票与美国国债等相比。现在,这个比较被称为股票风险溢价,它基本上根据这个指标来衡量你购买股票能获得多少额外回报。现在,股票风险溢价的收益率已经大幅上涨。因此可以预期购买股票并不能获得太多额外回报。所以从历史意义上来说,股票可能有点过高估值。

The second way that you can look at this is to evaluate equities relative to their own history. So things like PE ratio is, let's say, this PE ratio high or low historically speaking. Historically, it seems like it's relatively high. But when you look at these measures though, what you always have to realize is that what is overvalued can continue to become overvalued and what is cheap can continue to become very cheap.
你可以用第二种方法来看待这个问题,就是相对于自身历史评估股票。例如,市盈率(PE ratio)是不是相对于历史来说偏高还是偏低。从历史上看,似乎PE ratio相对较高。但是当你看这些指标时,你必须意识到其中一个事实,即被高估的资产可能继续被高估,而便宜的资产可能会继续变得非常便宜。

So if you are a classical macro guy, you're looking at this yields going higher, then equities are rich, we got to sell equities and maybe they're right. But there's also a lot of other things happening under the hood. Now, relationships and markets are always changing. So far equities have been quite resilient. I have no idea how things will go in the future, but I'm actually not bearish. And honestly, I'm getting the sense that there's a lot of people positioned for equities to tank looking at yields. If equities don't tank, these people are going to have to cover and they could squeeze the market higher in my view.
所以,如果你是一个古典宏观派,你会关注到利率上升,认为股市已经过度高估,需要卖出股票,这种观点可能是正确的。但事实上,在市场内部还有很多其他的因素在发生变化。市场关系总是在不断变化的。迄今为止,股市一直相当强劲。我不知道未来会如何发展,但我实际上并不看空。而且,老实说,我有种感觉,很多人都在预期股市将大跌,关注利率情况。如果股市不跌,这些人将不得不平仓,可能会推动市场上升,这是我的观点。

Now, the second thing that the Fed plugged is that they thought that commercial real estate is overvalued. And of course, it should be overvalued. If you look at cap rates, cap rates are really low relative to 10 year treasury yields. So now you can get 5% buying a 10 year treasury yield. Well, in cap rates, you can just get a little bit more from buying commercial real estate. And financial markets move very quickly. And so I guess the expectation would be for commercial real estate, a much slower moving market to gradually adjust going forward. So at the moment, prices seem to be high. And traditionally, people think of that as a concern for banks. And it is, but I think first and foremost, it's a concern for the people who actually own the real estate. They have a lot of equity in it. It's after all their equity gets wiped out that it becomes a big problem for the bank. So first, let's think about all these big commercial real estate operators.
现在,美联储提出的第二个观点是他们认为商业房地产被高估了。当然,它应该是被高估的。如果你看看资本化率,相对于10年期国债收益率,资本化率是非常低的。现在你可以通过购买10年期国债获得5%的回报率。而通过购买商业房地产,你只能稍微多一些。金融市场变化非常迅速。因此,对于商业房地产来说,一个变化速度较慢的市场预计将会逐渐调整。所以目前,价格似乎很高。传统上,人们认为这是银行的担忧。确实,但我认为首要的是,这是对实际拥有房地产的人们的担忧。他们在房地产中有很多资本。只有当他们的资本被抹去后,这才会成为银行的一个大问题。所以首先,让我们考虑一下所有这些大型商业房地产运营商。

And okay, and the last thing, of course, is that the Fed surveyed a whole bunch of people in the market to try to figure out just what they're worried about. Well, it seems like they're worried a lot about Fed tightening and they're worried about slowdowns in China. Now, I don't actually put too much into these surveys because oftentimes, it's about portfolio manager or CEO or someone who just kind of looks at this and recalls whatever it is he is reading in the news. But just take it for a reference. It seems like this is what people are thinking about.
好的,最后一件事,当然是美联储调查了市场上的很多人,试图弄清楚他们究竟担心什么。嗯,看起来他们非常担心美联储的紧缩政策,并且担心中国的经济放缓。现在,我并不完全相信这些调查结果,因为往往是由投资组合经理人、首席执行官或者某个人看了看新闻而随便说说。但可以把它当作一个参考。看起来这是人们正在思考的问题。

All right, that's all I've prepared for this week. If you like what I produce it, remember to like it, subscribe. And if you are interested in hearing more about my thoughts on the markets, check out my blog, fitguy.com. And of course, if you're interested in learning about macro assets, check out my courses at centralbanking101.com. We'll talk to you guys next week.
好的,这就是我为本周准备的全部内容。如果你喜欢我的作品,请记得点赞和订阅。如果你对我对市场的想法更感兴趣,可以关注我的博客fitguy.com。当然,如果你对宏观资产学习感兴趣,可以去centralbanking101.com参加我的课程。我们下周再见。



function setTranscriptHeight() { const transcriptDiv = document.querySelector('.transcript'); const rect = transcriptDiv.getBoundingClientRect(); const tranHeight = window.innerHeight - rect.top - 10; transcriptDiv.style.height = tranHeight + 'px'; if (false) { console.log('window.innerHeight', window.innerHeight); console.log('rect.top', rect.top); console.log('tranHeight', tranHeight); console.log('.transcript', document.querySelector('.transcript').getBoundingClientRect()) //console.log('.video', document.querySelector('.video').getBoundingClientRect()) console.log('.container', document.querySelector('.container').getBoundingClientRect()) } if (isMobileDevice()) { const videoDiv = document.querySelector('.video'); const videoRect = videoDiv.getBoundingClientRect(); videoDiv.style.position = 'fixed'; transcriptDiv.style.paddingTop = videoRect.bottom+'px'; } const videoDiv = document.querySelector('.video'); videoDiv.style.height = parseInt(videoDiv.getBoundingClientRect().width*390/640)+'px'; console.log('videoDiv', videoDiv.getBoundingClientRect()); console.log('videoDiv.style.height', videoDiv.style.height); } window.onload = function() { setTranscriptHeight(); }; if (!isMobileDevice()){ window.addEventListener('resize', setTranscriptHeight); }