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

Market Weekly September 23, 2023

发布时间 2023-09-23 17:04:11    来源
Hello my friends, today is September 23rd. My name is Joseph and this is Markets Weekly. Now this week was a super exciting week in Global Macro, so we have a lot to talk about.
大家好,今天是9月23日。我叫约瑟夫,这是本周市场动态(Markets Weekly)。这周在全球宏观经济领域发生了很多令人兴奋的事情,所以我们有很多话题要讨论。

First, we have to talk about Treasury yields. The 10-year Treasury yield soared to multi-year highs and touched 4.5% this past week. This caught many people in the market off guard, but hopefully none of you. Because if you have been listening to this program, we've been telling you months and months in advance that this was going to happen. And let me tell you, I don't think that the high is in yet for Treasury yields this year.
首先,我们必须谈谈国库收益率。上周,10年期的国债收益率飙升至多年来的高位,并触及4.5%。这让市场上许多人措手不及,但希望你们中没有人会受到影响。因为如果你一直在听这个节目,我们几个月前就已经告诉你们这种情况会发生。而且我要告诉你们,今年的国债收益率可能还没有达到峰值。

Okay, the second thing we'll talk about is the Bank of England. So the Bank of England met this past week and although everyone was expecting them to hike, they actually paused and they also adjusted their QT program to be slightly larger. Let's talk about what's happening in the UK.
好的,接下来我们要谈的是英格兰银行。英格兰银行在上周召开了会议,尽管大家都预计他们会加息,但他们实际上暂停了加息并调整了他们的量化宽松计划使其规模稍微增大。让我们来谈谈英国正在发生的情况。

And lastly, let's talk about a very interesting piece from the latest BIS quarterly. Now many people have been wondering why the UOC economy seems to be so resilient even though rates had gone off so quickly and to such a large extent. This BIS piece may hold part of the key to that puzzle.
最后,让我们来谈谈最新的国际清算银行(BIS)季度报告中的一篇非常有趣的文章。现在许多人都在想为什么UOC经济似乎如此有韧性,尽管利率上升得如此迅速且幅度如此之大。这篇BIS的文章可能揭示了这个谜题的一部分关键。

Okay, starting with Treasury yields. So this past week we had a Fed meeting and after the Fed meeting, the Treasury market began to sell off and that sell off became pretty significant with the 10-year yields touching 4.5% and then retreating a bit on Friday.
好的,先从国债收益率说起。所以上周我们有了一次联邦储备会议,会议之后,国债市场开始抛售,这次抛售相当显著,10年期国债收益率一度触及4.5%,然后在周五有所回落。

My best guess was that it was the dot plot that was the catalyst to this move. The dot plot contained two pieces of information this time that were pretty bearish for longer dated Treasuries. The first of course is that the Fed reaffirmed its higher for longer stance. Now in June, the Fed's dot plot penciled in 100 basis points of rate cuts next year in 2024. Now this most recent dot plot, they're only penciling in 50 basis points of cuts on account of economic strength. So that's telling the market that the Fed is going to stay higher for longer than they expected. So obviously that's going to push longer dated yields higher.
我的最佳猜测是,触发这次行动的是点图。这次的点图包含了两个信息,对长期国债来说相当悲观。首先当然是美联储重申了其更长时间加息的立场。在六月份,美联储的点图中预计明年2024年将会有100个基点的降息。然而在最新的点图中,他们只预计会有50个基点的降息,原因是经济实力。这就告诉市场,美联储将保持更长时间的高利率政策,超出了市场的预期。显然,这将推高长期收益率。

The second piece of information in the dot plot was that it seemed like the FOMC participants are coming around to the fact that perhaps our star that is the neutral rate of interest is higher today than it was in the past. And you can see that where the range of estimates that FOMC participants put for our star has been trending, the range has been kind of scattered towards upwards, towards three. The median is still 0.5% real though, but it's moving higher. So that is also I think structurally bearish for Treasuries as it suggests that rates are structurally higher going forward.
点图中的第二条信息是,看起来FOMC的参与者开始意识到,也许我们的中性利率——也就是恒星,今天比过去更高。您可以从FOMC参与者对我们的中性利率所给出的估计范围趋势中看到这一点,这个范围一直在向上分散,趋向于3。然而,中值仍然是0.5%的实际利率,但它正在上升。因此,我认为这对国债也具有结构性的看跌作用,因为它表明利率在未来会结构性地上升。

But regardless, I think the fundamentals of the treasury market as we've been discussing for months and months here are extremely bearish. In my view, rates are going to be structurally higher going forward. And for the benefit of the audience, I will review again why I think that these interest rates have to go higher and I'll also talk about why I don't think that the high is in yet for the 10 year yield.
但不管怎样,我认为我们在这里讨论了数月的国债市场基本面非常熊市。在我看来,未来利率将结构性上升。为了让听众清楚,我将再次解释为什么我认为这些利率必须上升,我还将谈谈我认为10年期收益率的高点尚未到来的原因。

So the way that I look at any asset class, it's not really about let's say growth or inflation or earnings and stuff like that at its essence, the fundamentals for any asset class in my view is just supply and demand.
所以,无论是任何资产类别,从我看来,它的本质并不在于增长、通胀或收益等方面,对于任何资产类别来说,我认为基本因素只是供需关系。

Now, if you just look at a chart of treasury supply that is to say the fiscal deficit, it's absolutely stunning like mind boggling. So the most recent estimate from the official sector is showing treasury issuance, let's say 1.5 trillion to 2 trillion each year, basically forever. It wasn't always like that.
现在,如果你只看看国债供应的表格,也就是财政赤字,它绝对令人震惊,难以置信。因此,官方部门最近的估计显示,每年国债发行额大约在1.5万亿到2万亿之间,基本上将永远如此。这并不总是这样的。

There was a time in the United States of history, not too long ago actually, maybe just 10 years ago where there would be a lot of people in Congress talking about having a balanced budget, trying not to spend too much money. But those guys are all gone now. It's just full speed ahead, spending more and more money.
在美国历史上曾经有一个时期,其实不是太久以前,也许只是10年前,很多国会议员都在谈论要实现财政平衡,努力不过度支出。但是现在这些人都不在了。现在的情况是,全速前进,花费越来越多的钱。

Now, if you spend more and more money, obviously you're just printing treasuries. And if the supply of treasuries is basically infinite, then obviously the prices have to go down. So one of the catalysts for this recent shift higher over the past few months, and if you zoom out, you'll see that treasury yields have been the past few weeks. You'll see that the treasury yields have been moving up over the past few weeks has been estimates showing that the US is spending more than expected and collecting less than taxes than expected. So issuance was higher than expected and that seems to have been one of the approximate causes for this recent belt higher.
现在,如果你花费越来越多的钱,显然你只是在印制国债。而如果国债的供应基本上是无限的,那么显然价格必须下降。因此,过去几个月来推动债券收益率上升的一个催化剂之一是估计美国的支出超出预期,并且税收收入低于预期。因此,发行量高于预期似乎是最近收益率上升的一个近似原因之一。

Paragraph 1: But longer term, of course, unless you think that the US government, the US Congress will begin to spend less money, it's very difficult for me to imagine a scenario where supply will actually come down. In fact, my belief is that we're probably going to get more spending as more people want more benefits and stuff like that. So treasury issuance is likely going to be even higher than what's currently estimated. So that's supply.
但从长远来看,除非你认为美国政府、美国国会将开始减少开支,否则很难想象供应量实际上会减少的情景。事实上,我认为我们可能会有更多的支出,因为越来越多的人希望得到更多的福利和其他东西。因此,国债发行很可能会比目前的估计还要高。所以这就是供应情况。

Paragraph 2: Now what is demand? Now demand, of course, over the past few years has been the Federal Reserve, quantitative easing, and the commercial banks, tremendous amounts of buying from commercial banks. Those two guys are out. They're not buying anymore. They're actually shrinking their balance sheets. I was surprised. I was thinking that this would happen earlier in the year, but it didn't because it actually was a new market participant that began to buy treasuries in size. And that was the hedge fund community who was buying cash treasuries as part of the cash futures basis trade. But my sense is that they are actually maxing out now. So I think that we're at a point where demand is going to hit an air pocket now and that could be sudden and I will write about this in my blog post this week. So that's the supply in demand dynamics.
那么需求是什么呢?在过去几年里,需求主要来自美联储的量化宽松政策和商业银行大笔的购买行为。这两个来源已经消失了。他们不再购买,实际上正在缩减资产负债表。我感到很惊讶。我之前认为这在今年早些时候就会发生,但实际上是一个新的市场参与者开始大规模购买国债。这就是作为现金期货基础交易的一部分,对冲基金群体购买现金国债。但我感觉他们现在已经达到了上限。所以我认为我们现在正处于需求将会遇到阻力的时刻,这可能是突然的,我会在本周的博文中写到这一点。那就是供需动态。

Paragraph 3: But there's actually two other aspects I think are very bearish with treasuries. The second one is where you get to more traditional fundamentals like inflation. So it's not that these things don't matter for bonds. It's just that when you're talking about people who invest, they all approach investing in treasuries differently. If you're the Fed, you're buying treasuries for policy. If you're a commercial bank, it's because of regulations and stuff like that. There are certain classes of investors who buy for looking at things like growth and inflation, but they're only one segment of the market, which is why when you focus on things like inflation, you are not giving the whole picture.
但实际上,我认为还有另外两个方面对国债非常悲观。第二个方面涉及到更传统的基本面因素,比如通胀。所以,并不是说这些因素对债券无关紧要,只是当谈到投资人时,他们对投资国债的方式各不相同。如果你是美联储,你会购买国债以推动政策。如果你是商业银行,可能是因为监管等原因。有一类投资人会关注增长和通胀等因素,但他们只是市场的一部分,所以当你专注于通胀等因素时,并不能提供完整的图片。

Paragraph 4: Now the second point, of course, is that from my perspective, inflation is likely going to be structurally higher. I think there's two sub points for this. One, of course, and I've written about this before, is Charles Goodard's theory that an aging population is inflationary because you have more and more people who don't work, but continue to consume. When you retire, you're a boomer, you have a whole bunch of money saved up from working and maybe you get Social Security, maybe you have a huge amount of home equity because you bought your house and you appreciate it a lot, but you're not working anymore. But you continue to consume, you continue to eat, to go on trips, go to restaurants and stuff like that. So there's a shift in supply and demand in balance for goods and services. That's inflationary. We're seeing that right now, actually. Remember, boomers retired. A lot of boomers retired earlier than expected during the pandemic. That pushed wages higher and led to a lot of inflation.
现在是第二点,当然,从我的角度来看,通胀可能会结构性地更高。我认为有两个次要因素。首先,当然,我之前写过的一点是查尔斯·古达德的理论,即人口老龄化是通胀的原因,因为越来越多的人不工作,但继续消费。当你退休时,你是个婴儿潮一代,你有一大笔工作储蓄,也许你能领到社会保障金,也许你在房屋投资中获得了巨额净值增长,但你不再工作了。但你继续消费,继续吃饭、旅行、去餐馆等等。因此,物品和服务的供需平衡发生了变化。这是通胀的原因。实际上,我们现在正在看到这一点。记住,婴儿潮一代退休了。在疫情期间,很多婴儿潮一代提前退休,推高了工资并导致了很多通胀。

Paragraph 5: Now the second sub point to this is I think this is a really good chance that the said will actually revise its inflation target higher. Now I think right now what's happening is that well, everything is going well and everyone's letting the Fed do their job, but there will come a time where the economy may be it's not doing as well as people would like. Maybe unemployment is increasing and at the same time, maybe inflation is still not back to 2%. At that time, I think there's going to be a lot of political pressure on the Fed to move their inflation target higher to maybe 3% so that they won't have to keep raising rates to cause higher unemployment in exchange for lower inflation. I think the tradeoff between inflation and unemployment is going to tilt towards a society that is more accepting of higher inflation. Now to be clear, we don't hear a lot of that now. We had an episode that I did earlier where we talked about very prominent political comment haters making the argument for higher inflation target. It's not super mainstream yet, but I think that next time we have an economic downturn, it's going to be very loud and maybe it will happen.
第二个子点是我认为美联储可能会将通胀目标上调,这是一个很好的机会。目前情况看,一切都还好,大家都让美联储来负责工作,但会有一个时间,也许经济不如人们所愿,也许失业率在增加,同时或许通胀还没有回到2%。那时,我认为将会有很大的政治压力使美联储将其通胀目标上调到3%,这样他们就不必继续提高利率来换取较低的通胀率和较高的失业率。我认为通胀和失业之间的权衡将会倾向于更容忍较高通胀的社会。现在清楚地说一下,这个声音并不多见。我们之前做过一期节目,讨论了非常知名的政治评论批评家提出了提高通胀目标的论点。这还不是主流,但我认为下一次经济衰退时,这种声浪将会很大,也许这种调整会发生。

Paragraph 1: Now the last point where I think is really important to understanding why I think treasuries will go higher is just geopolitical risk. So as we all know, many, many prominent countries in the world hold treasuries and some of them are not best friends with the US. And going forward, these countries are going to be scared to have too much exposure to US treasuries because they know that if they ever are on the wrong side of a dispute, the US government is willing to confiscate their treasuries and that is a matter of national security. They're going to have to diversify a bit. It's going to be really hard to do and it's going to happen gradually, but I'm pretty sure it will happen, it has to happen. And that is of course another reduced sense of demand, a reduced source of demand. So from my perspective, treasury yields can only go up. They're not going to go up in a straight line. We'll have scares, we'll have risk off filler off so that will, I think, push people to treasuries if only for a counter trend rally. But from my perspective, I think being still trend higher. Now when treasuries were 4%, I thought it was really easy to say that it would go up to 4.5%. Or now that we're around 4.5% for this year, I still think we trend higher, but from my perspective, it's not as high conviction as it was before.
现在我认为非常重要的最后一点是地缘政治风险。众所周知,世界上许多重要国家持有美国国债,其中一些国家与美国并非最好的朋友。而且,未来这些国家会担心在美国国债上暴露过多,因为他们知道,如果他们与美国政府站在争议的错误一边,美国政府愿意没收他们的国债,这关系到国家安全问题。他们将不得不进行一些分散投资。这将是非常困难的,并且会逐渐发生,但我非常确信这将会发生,也必须发生。当然,这也意味着对需求的减少。在我看来,国债收益率只能上升。它们不会一直呈直线上升。我们会面临恐慌,我们会面临风险偏离,这样会推动人们购买国债,即使只是为了反向上涨的趋势。但在我的观点中,我认为趋势仍然是上升的。当国债收益率达到4%时,我认为它将很容易上升到4.5%。或者现在我们的收益率水平已经接近4.5%了,我仍然认为我们会呈上升趋势,但从我的角度来看,相比之前,我对此并不如此确信。

Paragraph 2: Okay. Now let's talk about the bank of England. So this past week, the Bank of England met. Everyone was thinking that the Bank of England was high. And they should hike because. Yeah, so let's look at what's happening in the UK. So in the UK, obviously like everyone else, the UK has an inflation target of about 2%. And as you can see, they are very, very far from their inflation target. Inflation is comfortably above 6%. Now the good news is that inflation is coming down and it seems to be coming down faster than expected. But of course, it's still much higher. On the economy front, the UK economy seems to be slowing pretty rapidly. Now recent survey data suggests the UK data is cooling a lot. And there's good reason to think that monetary policy really is working very quickly. Now one thing that's different in the UK compared to the US is that in the UK, a lot of people have short-dated mortgages. So as the UK, as the Bank of England has been hiking rates, eventually homeowners refinance, let's say, for a few years, and then refinancing and interest rates that are much, much higher than when they initially took out their mortgages. And so their interest expenses are soaring. And so that is going to quickly eat into their disposable income and let monetary policy effectively cool the economy. So on the one hand, inflation is much higher than the target. On the other hand, it seems like monetary policy is working on the economy is slowing. So it seems like the Bank of England took that into account and decided to pause. The reaction to this, of course, was quite swift that the pound sold off against the dollar and potentially the Bank of England could be done.
好的,现在让我们来谈谈英格兰银行。所以上个星期,英格兰银行开会了。大家都认为英格兰银行会加息,因为,嗯,让我们看看英国的情况。显然,像其他国家一样,英国有一个2%的通胀目标。正如你所见,他们的通胀目标距离很远。通胀的水平远高于6%。现在好消息是,通胀正在下降,而且似乎下降得比预期快。但当然,它仍然远高。在经济方面,英国经济似乎正在快速放缓。最近的调查数据表明英国数据正在大幅下降。有充分理由认为货币政策确实在非常迅速地起作用。现在英国和美国的一个不同之处是,在英国很多人有短期抵押贷款。因此,随着英格兰银行加息,最终房主会重新融资,比如说再贷款几年,但利率比他们最初贷款时要高得多。因此,他们的利息支出正在飙升。这将迅速消耗他们的可支配收入,实际上让货币政策缓解经济。所以一方面,通胀远高于目标。另一方面,货币政策似乎在发挥作用,经济正在放缓。因此,英格兰银行似乎考虑到了这一点,决定暂停。市场对此的反应当然是非常迅速的,英镑对美元出现抛售,英格兰银行有可能已经结束加息。

Paragraph 3: We call that the ECB also paused at their meeting and in part due to a slowing economy. Of course, they were careful to clearly state that inflation continued to, if inflation was higher than they expected later, they would be prepared to hack again. But of course, they have to say that my sense is that they're probably done for now. Monetary policy for them really is working unlike the US, where it's much more difficult, which we'll talk about in a moment.
我们称之为欧洲央行(ECB)在他们的会议上也暂停了部分,其中一部分原因是经济放缓。当然,他们小心地明确表示通胀仍在继续,如果通胀比他们预期的更高,他们将准备再次减息。但当然,他们必须这样说,我觉得他们现在可能已经结束了。对于他们来说,货币政策确实有效,与美国相比,货币政策要更加困难,我们稍后会讨论这个。

Paragraph 4: Now what I found really interesting about the Bank of England's meeting is that they actually toggled their quantitative tightening program. Now their quantitative tightening program was shooting for, say, getting rid of 80 billion pounds of securities. Now they're raising that to 100 billion, 100 billion, great British pounds worth of securities in the coming months.
现在,我对英格兰银行的会议发现了一件非常有趣的事情,那就是他们实际上切换了他们的量化紧缩计划。他们的量化紧缩计划旨在清理800亿英镑的证券。现在他们将这个数字提高到了即将清理价值1,000亿英镑的证券。

Paragraph 5: So they're increasing the pace of QT and that makes perfect sense to me because when you look across the world, when anyone borrows, they're not really borrowing at the overnight tenure. They're always borrowing, let's say, five, six, seven year tenure and that is much more affected by the QT program than it is overnight rates. And so it seems like to make monetary policy even more effective. They're shrinking their QT portfolio as a way to make term interest rates higher. Now that's a really good idea. Many people have commented that maybe the Fed should do the same. The Fed, in my view, is definitely not going to do that, but they don't have to because the deficit in the US is high and so the drill strategy is going to show a lot of securities and push lower-dated yields higher anyway.
所以,他们正在加快缩减量化宽松(QT)的速度,这对我来说非常合理,因为当你看看全球,当任何人借款时,他们实际上并不是借款期限为隔夜。他们通常是借款五、六、七年,而这更受QT计划的影响,而不是隔夜利率。因此,似乎减少QT投资组合是使期限利率更高的一种方式。这真是个好主意。许多人评论说,也许美联储应该采取同样的做法。在我看来,美联储绝对不会这样做,但他们不必这样做,因为美国的赤字很高,所以抛售策略将会推高较低期限的收益率。

Paragraph 6: Now the last thing that we'll talk about is this interesting piece from the latest BIS quarterly. Now the BIS quarterly is a quarterly publication from the Bank of International Settlements, which is kind of like the central bank of central bankers that publishes a lot of interesting stuff. Now they have access to data that no one else in the world has access to. Central banks across the world give them confidential data. They look at that data and they publish their insights based on it. So I really like reading that stuff. I recommend that you read their work as well. And one of the things that stuck out to me this past quarterly is their graphs showing how resilient the US economy is to interest rates.
现在我们要谈的最后一件事是最新一期国际清算银行(BIS)季刊上的这个有趣报道。国际清算银行的季刊是来自中央银行的中央银行,发布很多有趣的内容。他们拥有全球独家的数据。世界各国的中央银行向他们提供机密数据。他们分析这些数据并基于此发布他们的见解。所以我真的很喜欢阅读他们的内容。我推荐你也阅读他们的作品。而在最近一期的季刊中,他们展示了一个图表,显示美国经济对利率的弹性。

Now there's this really, really interesting chart here showing how across the world, non-financial corporations seem to have been borrowing longer term and with fixed rates. Now far above all these other countries is how US non-financial corporations behaved. US financial corporations bought much, much more, longer data, tenors and much, much more fixed rate than they did in the past compared to their own past and compared to all other countries. And I think this is a key reason why the US corporate sector has been so resilient. You see all these companies really haven't been paying high interest rates yet because they haven't had to renew. But all the while they've been sitting on a lot of cash that actually has gone off in interest rates. So in fact higher interest rates has been a net benefit to the non-financial corporate segment. Their liabilities, their debt has it really gone up in interest rates but their cash assets which they've been holding in money market funds has been increasing in what they pay in interest. So so far actually not only have high interest rates not really stress the cash flows of the non-financial corporate sector in the US, it's actually been a net benefit. Very surprising.
现在有一张非常非常有趣的图表,显示了全球范围内,非金融公司似乎正在更倾向于长期借贷和固定利率。在所有这些国家中,美国非金融公司的行为远远超过其他国家。与过去相比,美国金融公司购买了更长期的数据、期限和更多的固定利率。我认为这是美国企业部门如此具有弹性的一个关键原因。你会发现,这些公司实际上并没有支付高利率,因为他们还没有进行到续期的阶段。但与此同时,他们一直在持有很多已经按照利率计算的现金。因此,事实上,更高的利率对非金融企业部门来说是一个净收益。他们的负债、债务的利率并没有真正上涨,而他们持有的货币市场基金中的现金资产则在支付的利息上不断增加。因此,迄今为止,高利率实际上不仅没有对美国非金融企业部门的现金流产生压力,反而带来了净收益。非常令人惊讶。

The second thing in that BIS piece is of course discussion of the majority wall. Eventually all these US corporations are going to have to renew their debt and when they renew it's going to be at much higher interest rates. So monetary policy is going to finally hit the corporate sector. But the majority wall that they show in the BIS is super interesting in that it's very very staggered. It's not just going to all hit in 2024 or 2025 but it's spaced out evenly over a number of years. And so that again suggests that corporations are going to feel the pain of higher interest rates but only gradually. So in my, from my mind that again supports interest rates staying higher for longer simply because all this work that the Fed has done isn't really going to be felt by the corporate sector for over a few years. Not to mention of course if you're looking at the households while everyone has third year mortgages at you know 3% and that's basically they're never going to feel higher interest rates.
BIS这篇文章中的第二件事当然是关于大多数企业将不得不续债的讨论。当它们续债时,利率将大幅上升。因此,货币政策最终将对企业部门产生影响。但BIS展示的大多数企业续债时间非常有趣,非常不连贯。它不会在2024年或2025年全部到期,而是平均分布在几年之内。这再次表明,企业将逐渐感受到较高利率的痛苦,但只会逐渐增加。因此,在我看来,这再次支持利率保持较高的时间更长,简单来说,是因为美联储所做的所有工作在未来几年内不会真正对企业部门产生影响。更不用说如果你看到家庭,每个人都有3%的住房抵押贷款,基本上他们永远不会感受到更高的利率。

So again it seems to me that the Fed compared to the rest of the world has an economy that is more resilient interest rates supporting their position of higher for longer and likely suggest further dollar strength.
所以根据我看来,与世界其他国家相比,美联储拥有更具弹性的经济,利率支撑了他们维持较高水平的立场,并且可能会进一步加强美元的实力。

Okay so that's all I prepare for today. Thanks so much for tuning in. If you like what I'm producing remember to like and subscribe and remember to check out my blog thinguy.com for my most recent market commentary and if you're interested in learning more about global macro check out my online courses at centralbanking101.com. I'll talk to you all next week.
好的,这就是我今天准备的全部内容。非常感谢大家的收听。如果你喜欢我的作品,请记得点赞和订阅,并且记得查看我的博客thinguy.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); }