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

Markets Weekly March 30, 2024

发布时间 2024-03-30 15:32:40    来源
Hello my friends, today is March 30th. Happy Easter weekend, this is Markets Weekly. So this week was a pretty quiet weekend markets. We only had four trading sessions, but the S&P 500 didn't manage to make a new all-time high. From my perspective, though, it looks like the NASDAQ is running out of momentum, so it would not surprise me if we just kind of, you know, consolidated here for a little bit and and gave other people the chance to join the party. So today I want to talk about three things. First, I want to talk about the tremendous challenge facing Japanese policymakers because it looks like they're about to lose control of the Japanese yen.
大家好,今天是3月30日。复活节周末快乐,这是本周市场周报。本周市场相当平静。我们只有四个交易日,但标普500指数没有创造新的历史最高记录。从我的角度来看,纳斯达克似乎失去了动力,所以如果我们在这里稍微整理一下,给其他人加入派对的机会,我也不会感到惊讶。今天我想谈论三件事。首先,我想谈谈日本政策制定者面临的巨大挑战,因为他们似乎即将失去对日元的控制。

Secondly, I want to talk a little bit about this new research from the Federal Reserve Bank of San Francisco that sheds interesting light on the surge in early retirements during the pandemic. And lastly, I want to discuss hyperinflation during Revolutionary France and what we could learn from it. Okay, starting with the yen. Now, just to level set a little bit, over the past few years, the Japanese yen has depreciated significantly against all major currencies. And the reason for the depuriation is obvious. Now, over the past few years, all the major central banks were raising rates aggressively to try to come back to inflation while Japan kept interest rates negative and only recently hiked them to zero.
其次,我想谈一下来自旧金山联邦储备银行的最新研究,它为疫情期间早期退休潮带来了有趣的启示。最后,我想讨论法国大革命期间的恶性通货膨胀,并从中学到些什么。好的,我们先从日元开始。现在,只是为了稍微了解一下,过去几年,日元对所有主要货币都出现了显着贬值。而贬值的原因是显而易见的。在过去几年里,所有主要的中央银行都在积极提高利率,试图重新回到通胀,而日本则保持利率为负值,直到最近才将其提高至零利率。

So this huge interest rate differential drove a rapid depreciation of the Japanese yen. You can think of it as maybe you're a Japanese investor. You're seeing that you're getting zero interest rates at home. You could get 5% in the US, so you sell yen by dollar assets. Or you could be a foreign speculator and funding your investments in yen. In any case, the Japanese USC JPI exchange rate right now is bumping up against 151 which over the past few years has seemed to be a soft ceiling.
因此,这种巨大的利率差异导致日元迅速贬值。你可以这样想,也许你是一名日本投资者,看到国内的利率为零。在美国可以获得5%的利率,所以你会卖掉日元买美元资产。或者你可能是一名外国投机者,用日元资助你的投资。无论如何,目前日元兑美元的汇率已经触及151,这在过去几年似乎一直是一个较弱的上限。

Now, when you're in this situation as a policymaker, you have three options. First, you can do verbal intervention and try to talk the speculators down. Secondly, you can actually intervene. So actively sell foreign currency and buy your domestic currency. Or three, you could adjust the Santa Montre policy and make it less attractive for speculators to sell your currency. Now, over the past week, we've seen Japan come out and do some serious verbal intervention.
现在,作为政策制定者,当你处于这种情况下时,你有三种选择。首先,你可以进行口头干预,尝试说服投机者减少投机行为。其次,你可以实际干预。也就是积极出售外汇并购买本国货币。或者你可以调整圣塔蒙特政策,并使其对投机者卖出你的货币不那么有吸引力。现在,在过去的一周中,我们看到日本对外汇进行了一些严肃的口头干预。

Their top currency official goes is going around saying that he thinks that the depreciation in the yen is not driven by fundamentals, but in speculation, he doesn't like it. He wants it to stop. Now, over the past few years, I think they were happy with the depreciation in the yen because it helped them get inflation up by increasing imported costs. And of course, it was also good for exporters, but it looks like depreciation has gone too far for them. And so they're trying to talk it down. Now, I'm not sure what fundamentals the policymakers looking at, but if you look at say, even real interest rate different shows, it does seem to justify a weaker yen. But in any case, it doesn't seem to be working because it looks like USD JPY is still hovering around that 150 soft ceiling.
他们的顶级货币官员表示,他认为日元贬值不是基本面驱动的,而是投机,他不喜欢这种情况。他希望它停止。在过去几年里,我认为他们对日元贬值感到满意,因为这有助于通过增加进口成本来推高通货膨胀率。当然,这对出口商也是有利的,但他们似乎认为日元贬值已经太远了。因此,他们正试图压低日元。现在,我不确定决策者看中的基本面是什么,但如果你看看实际利率差异,确实似乎支持日元贬值。但无论如何,似乎并没有奏效,因为美元兑日元仍然围绕在那个150软上限附近。

Now, the second thing a policy maker could do is to actually intervene. So they would have to go use their foreign reserves, sell them and buy back their domestic currency. So Japan is a country with a major current account surplus. So they've accumulated tremendous amounts of foreign reserves. According to official filings, Japan has about $1.1 trillion in foreign reserves. Not all of it is going to be in dollars. As a major trading nation, I'm sure they have reserves in euro and R&B and other currencies as well. But I'm guessing, let's say the bulk of it is. So maybe they have say $700 billion of that is in US dollars. So they definitely have the firepower to intervene if they want. But here's the problem with that.
现在,政策制定者可以做的第二件事就是实际干预。他们将不得不动用外汇储备,出售它们并回购本国货币。因此,日本是一个拥有巨额经常账户盈余的国家。他们积累了大量外汇储备。根据官方文件,日本拥有大约1.1万亿美元的外汇储备。并非所有都是美元。作为一个主要的贸易国家,我肯定他们也拥有欧元、人民币和其他货币的储备。但我猜想,大部分可能是美元。也许其中有7000亿美元是美元。所以如果他们想要干预,他们肯定有足够的实力。但这其中存在问题。

Now, they actually already intervened in late 2022 when USD JPY was pushing against 150. And their intervention led to the yen to strengthen significantly. But now we're back here at 150. So it looks like the dips in USD JPY just get shallower and shallower. The market, it doesn't seem to be as effective and the market seems to be less scared. What they would do if they were to intervene is they would probably burn, say, tens of billions of dollars and they would buy time. And maybe, in a few months, maybe the US get some soft data, market prices in, more fed cuts, and maybe the yen get some reprive. But then again, maybe that doesn't happen. So it's not super clear if that's the best course of action. The last thing a policy market could do is they could adjust the sense of monetary policy. So in this case, that would be to hike interest rates, let's say 250 basis points, or even 100, and narrow the interest rate differential from their side.
现在,他们实际上在2022年末已经进行了干预,当时美元/日元汇率正逼近150。他们的干预导致日元大幅增值。但现在我们又回到了150。因此,看起来美元/日元的跌势变得越来越浅。市场似乎不像之前那么有效,也似乎不太害怕。如果他们要干预,他们可能会燃烧数百亿美元,买一些时间。也许几个月后,美国会有一些软数据,市场会定价更多的联邦基准利率下调,也许日元会得到一些喘息时间。但另一方面,也许这种情况不会发生。因此,目前最好的行动方针并不十分明确。政策市场最后能做的一件事是调整货币政策的意愿。在这种情况下,可能会提高利率,比如说250个基点,甚至100个基点,并减小双方的利率差距。

Now, this would go some ways towards making it less attractive to short the yen. But again, even if you hike it by 50 basis points, I don't know, the interest rate derivative is still quite wide. And also, Japan has been struggling with disinflation for some time. I'm not sure they want to have such an aggressive hiking cycle. So that seems very unlikely to me. Their best bet is probably just to intervene and hope for the best. But if they don't do that, though, if the market breaks through this soft ceiling of say 150, 151, you could easily have momentum build and have some surges to the upside. So they are, I think they are in a kind of a tricky position now. And it's going to have to get resolved really soon. So they're going to have to put up or shut up.
现在,这将在一定程度上减少抛空日元的吸引力。但即使你加息50个基点,我不知道,利率衍生品仍然相当宽松。而且,日本一直在与通货紧缩抗争。我不确定他们是否想要进行如此激进的加息周期。所以对我来说,这似乎是不太可能的。他们最好的选择可能就是干预市场,希望一切顺利。但如果他们不这样做,如果市场突破了150、151一带的软顶,很容易就会出现动能积聚,并且有可能向上突破。所以我认为,他们现在处于一个比较棘手的位置。这个问题必须尽快解决。所以他们必须勇于挑战,否则只能含泪默数。

Okay, the second thing I want to talk about is this brand new research from the Federal Reserve Bank of San Francisco. That shed some interesting light on the surge in early retirements we saw during the pandemic. So to level set a little bit during the pandemic, of course, everything shut down. Everyone stayed at home, labor force participation dropped significantly across all age cohorts. But as the economy opened up again, a lot of people went back to work. Basically, everyone went back to work, except those age 55 and above labor force participation for those age 55 and above dropped during the pandemic and just never recovered. Now, this led to an basically shortage of labor compared to pre-pandemic estimates. The labor force was smaller by 2 million people. And that shortage of labor was part of the reason behind the labor scarcity and surging wages.
好的,我想谈论的第二件事是来自旧金山联邦储备银行的这项全新研究。这一研究揭示了我们在疫情期间看到的提前退休潮的一些有趣情况。在疫情期间,当然,所有事情都关闭了。每个人都呆在家里,各个年龄段的劳动参与率都显著下降。但随着经济再次开放,很多人重新开始工作。基本上,每个人都回去工作了,除了55岁及以上的人群,在疫情期间这个年龄段的劳动参与率下降,而且从未恢复。现在,这导致了与疫情前预期相比劳动力短缺。劳动力比疫情前减少了200万人。这种劳动力短缺是导致劳动力短缺和工资飙升的原因之一。

Now, this new data from the Federal Reserve Bank of San Francisco further breaks down that cohort of 55 plus and has an interesting finding. That is, the only thing that stood out was that there was a serious break in that there's a structural shift in behavior for those age 55 and above without college degrees. So the unexpected surge in early retirements really just comes down to this cohort of people age 55 and above without college degrees. And now that's kind of a puzzle here. It could be of health concerns. It could be maybe they, you know, just had enough savings, had enough wealth. It's not super clear. And I think that's more of a sociology question.
现在,来自旧金山联邦储备银行的新数据进一步详细分析了55岁及以上年龄段的人群,并发现了一个有趣的事实。即,唯一引人注目的是,对于那些55岁及以上且没有大专学历的人来说,他们的行为存在严重的变化。因此,提前退休的意外激增实际上只是发生在这个没有大专学历的55岁及以上人群中。现在这里有一个谜题。可能是出于健康考虑。也可能是他们拥有足够的储蓄、足够的财富。目前并不是非常明确。我认为这更像是一个社会学问题。

But I also think that it relates to other issues. So if you are someone who's 55 and above without a college degree, you're probably in the trades. Maybe you are a truck driver, maybe you are a plumber, something like that. And that goes along when explaining all the anecdotal reports we've been hearing around that time where it was very difficult to find someone to come and, you know, basically do more manual labor. It seems like that was founded upon this huge surge in early retirements. Now, as a corollary to that, it seems like a part of the reason why things seem to have gotten better could be because we have such a huge surge in low skilled immigrants over the past year. Now, the CBO estimates that immigration last year was about 3.3 million, most of it illegal. Now, we do have some interesting studies on the skills competition of these people. And, you know, as we hear that they're not really sending their best, they're not college grads. It seems like more like middle school in Spanish. So, but these guys are probably able to do a lot of the labor intensive jobs that we seem to need to be done.
但我也认为这与其他问题有关。所以,如果你是55岁及以上的人并且没有大学学位,那你可能在从事技术工作。也许你是一名卡车司机,也许你是一名水管工,类似的工作。这也解释了我们一直听说的那些孤立事件报告,那时很难找到人来做更多的体力劳动。似乎这是基于早期退休人数激增的基础上建立起来的。现在,作为一个推论,似乎事情变得更好的部分原因是过去一年中低技能移民数量激增。现在,国会预算办公室估计去年的移民数量约为330万,大部分是非法移民。现在,我们对这些人的技能竞争进行了一些有趣的研究。正如我们听说的他们并不是最好的,他们并没有大学学历。似乎更像是西班牙的初中水平。但这些人可能能够胜任我们看起来需要完成的很多体力劳动。

And so that might go long ways in explaining, I guess, the disinflationary trend we've seen in wages, which continue to be high, but are no longer accelerating and seem to be gradually decelerating. One other thing that I'll note is that, so if you have a surge in the supply of labor to try to tem down on labor inflation, that's great when you have a lot of demand. But ultimately, one day, when demand falters, and you continue to increase the supply of labor and Sid, probably do on Twitter, made this good point, then you'll just have higher unemployment rates, which, of course, would argue from the Fed's perspective for easier monetary policy. So there's a lot of things happening in demographics right now that might be making these models that people usually rely on to be less reliable.
因此,这可能在一定程度上解释我们在工资上看到的通货納率走势,虽然工资依然很高,但不再加速,似乎正在逐渐减速。另一件我要注意的事情是,如果劳动力供应激增以抑制劳动力通货膨胀,那是在需求旺盛的情况下是很好的。但最终,当需求下降,你继续增加劳动力供应,像Sid可能在Twitter上提到的那样,这只会导致更高的失业率,从美联储的角度看,这当然会主张更容易的货币政策。因此,目前人口统计学上发生了许多事情,可能导致人们通常依赖的这些模型变得不太可靠。

The last thing I want to talk about is hyperinflation in revolutionary France. Now, this topic came to me by looking at a post by copy that featured writings by Eric. Now, Eric, I had heard him recently on the Market Huddle podcast. He had managed African portfolio for a number of years, and he was discussing his experience with hyperinflation in Zimbabwe. But he also then posted this article about hyperinflation in the meantime of revolutionary France. So let's say 1780, 1790s. I thought this was fascinating. So I went and dug a little bit deeper, looking at some research by Professor Andrew White of Cornell University written in 1912, and also some recent podcasts on the subject on macro musings, where you had two scholars looking at this from a monetary policy perspective. I thought it was so interesting that I just had to talk about it.
我想要谈论的最后一件事是法国革命时期的超级通货膨胀。这个话题是通过一篇由Eric撰写的帖子引起了我的注意。Eric最近在Market Huddle播客中发表了讲话。他多年来管理非洲投资组合,讨论了津巴布韦的超级通货膨胀经验。然后他还发表了这篇关于法国革命时期的超级通货膨胀的文章。比如说1780年到1790年代。我觉得这很吸引人,于是我深入研究了康奈尔大学安德鲁·怀特教授在1912年撰写的一些研究,还听了一些最近关于这个主题的播客,比如宏观探索,那里有两位学者从货币政策的角度分析了这个问题。我觉得这很有趣,所以我必须谈论一下。

So the hyperinflation in revolutionary France was ultimately a fiscal problem. At that time, France was highly indebted, so much indebted that about 15 of government revenues were to pay interest. So obviously, that was unsustainable. So what do the policymakers decide to do? Well, they decided to create a new currency called the Asignan, which was which they would use to pay off their debts. Now, of course, you know, they have a, they're not just going to create money out of thin air. So they wanted to make people have confidence in their new currency and decided to back it by real estate. So back then you had different power centers in France, you got our stocker see, you know, you have the crown, you have the clergy and the clergy was just not as powerful. And so everyone decided to confiscate their lands. And they were the largest landholders in France, just confiscate their lands and issue Asignans against them.
因此,法国革命时期的恶性通货膨胀最终是一个财政问题。那时,法国负债累累,债务如此之多,以至于约有15%的政府收入用于支付利息。显然,这是不可持续的。那么政策制定者决定做什么呢?他们决定发行一种名为“亚西尼安”的新货币,用来偿还债务。当然,他们并不是无中生有地创造货币。所以他们想要让人们对他们的新货币有信心,并决定以房地产作为支撑。当时,法国有不同的权力中心,贵族、国王、教会,而教会的权力并不如其他两者强大。因此,大家决定没收教会的土地,而他们是法国最大的土地所有者,就没收他们的土地,并用亚西尼安发行债券。

The way this would work is that they would pay off their debts with this newly issued currency. And then they could sell the clergy's land, but only accept payments in either gold or Asignans. So this link between, say real estate and gold and Asignans was able to give confidence in the value of this newly printed currency. Now, first they printed $400 million worth of it. And then a few months later, the government ran into trouble remembered what a great idea it was to print Asignans and they printed $800 million. And later on, they printed more, but they're realizing that this was getting out of hand and they would promise everyone, no, this is the last time we'll do this. We won't do this anymore. And but they would promise that and, you know, a few months later, they would print more again. When all the senate done by 1797, they would have printed $45 billion worth of Asignans. And as you can see, the price of Asignans against gold basically crumpled such that by the end of 1797, they were worth nothing and ultimately cancelled.
他们通过发行这种新货币来偿还债务。然后他们可以出售神职人员的土地,但只接受黄金或Asignans支付。因此,房地产、黄金和Asignans之间的联系能够增加这种新印刷货币的价值信心。最初他们印制了价值4亿美元的货币。几个月后,政府遇到麻烦,回想起印制Asignans是一个好主意,于是印刷了8亿美元。之后他们印刷了更多,但意识到情况变得不受控制,他们承诺每个人,不,这是最后一次了。我们不会再这样做了。但是他们承诺过,你知道的,几个月后,他们又再次印刷了更多。到1797年,他们总共印制了价值450亿美元的Asignans。正如你所看到的,Asignans对黄金的价格基本上崩溃,以至于到1797年底,它们一文不值,最终被取消。

Now, I thought, okay, first of all, that's what happened. But let's talk a little bit about the economic and social political implications of this. So by and large, the first issuance of $400 million was widely what was very positive. Everyone was happy. All this money went through the system. People felt richer. People were buying. Economic growth was good. Everyone felt richer. But that seemed to be temporary. And soon after, that sudden surge would fade. And subsequent printings of Asignans didn't seem to have the same impact. In fact, later on, the more they printed, you didn't actually get that surge in economic growth anymore. All you got was inflation. And that had some interesting qualities to it.
现在,我想,首先是发生了这件事。但让我们谈一下这件事的经济和社会政治含义。总的来说,最初发行的4亿美元是非常积极的。每个人都很高兴。所有这些钱通过系统流通。人们感到更富有。人们在购买。经济增长很好。每个人都感到更富有。但这似乎是暂时的。很快,突然的激增就会消退。后续发行的纸币似乎没有同样的影响。事实上,随着他们印更多的纸币,你实际上不能再得到经济增长的激增。你得到的只是通货膨胀。这有一些有趣的特点。

Now, when prices began to rise, a lot of the businesses and so forth, they felt unsure about what was going on in the economy. So they began to have less investment. They began to be more cautious. And that also meant that there was less demand for labor. And so ultimately, what you ended up was some kind of economic stagnation with rising prices. And the people at the time, they were complaining that everything was expensive. They couldn't buy anything. There wasn't enough money. And so they would complain to the government who in turn would respond by just printing more money, which never seemed to solve the problem.
当价格开始上涨时,许多企业感到对经济的发展不确定。因此,它们开始减少投资,并变得更加谨慎。这也意味着对劳动力的需求减少。最终,你会发现经济停滞但价格却在上涨。当时人们抱怨一切都很昂贵,他们买不起东西。钱不够用。因此他们向政府抱怨,政府便只是不断印钞,但从未解决问题。

Now, at that time, I think it's worth noting that, all the talking heads, all the luminaries, all the newspapers would go around telling people that, you know, actually, inflation is a good thing. It's good for business. Or when people were unhappy about inflation, they would tell them that, you know, this is because you have all these people from England who are counterfeiting the currency, those bad foreigners, which actually did actually happen. But they would also point to things like, you know, these greedy, rich people, bad government, and so forth. But they would never actually talk about the root cause, which was they were just issuing too much currency.
那个时候,我认为值得注意的是,所有的专家、名人和报纸都在告诉人们,其实通货膨胀是一件好事。它对商业有利。或者当人们对通货膨胀感到不满时,他们会告诉他们,你知道的,这是因为你有那些从英格兰来的人在伪造货币,那些坏外国人,这实际上确实发生过。但他们也会指出一些其他原因,比如这些贪婪的富人、腐败的政府等等。但他们从来没有真正谈到根本原因,就是他们发行了太多的货币。

And as times became tough, the government would roll out all sorts of measures to try to contain this. They would go towards traditional measures, say price controls, which is, of course, whatever government does in response to inflation, that would try to control, you know, let's say basic necessities cannot be exceed this price. If you are a merchant, you can only make this much profit. Or if you were shipping stuff, you could only have this much charge this much per mile and so forth. And these price controls really didn't seem to make things better. In fact, because the price control levels were set so far below market, many merchants simply couldn't make a profit and just, you know, just stop doing business.
随着时光变得艰难,政府会采取各种措施来尝试遏制这种情况。他们可能会采取传统措施,比如价格控制,这当然是政府对通胀做出的回应,试图控制,比如说基本必需品的价格不能超过这个数额。如果你是商人,你只能赚取这么多利润。或者如果你从事运输业,你每英里只能收取这么多费用等等。这些价格管制似乎并没有使情况变得更好。事实上,由于价格控制水平远低于市场价格,许多商人根本赚不到利润,最终只能停止经营。

Now, throughout through this period, what I found was most interesting was that basically the price of everything from real estate to basic necessities and socks all crashed up. Everything except the price of labor. Because as business stagnated, there was just less demand for labor, basic supply and demand, you know, that kit wages low, such that wages basically were unchanged during the period, even as the price of everything soared. And a lot of the working class ended up having to live on government rations.
在这段时间里,我发现最有趣的是,从房地产到基本生活必需品再到袜子,所有东西的价格基本都暴跌了。除了劳动力的价格。因为随着企业停滞不前,对劳动力的需求减少了,简单的供求关系,你懂的,这导致工资水平低,工资基本上在这段时间内没有变化,即使其他物价飙升。许多工薪阶层最终不得不靠政府救济过活。

So at the end of the day, at the end of the period, you know, no one, everyone suffered, the labor suffered, the merchant class suffered, and even the rich suffered as well. The only people who really did well during this period were the speculators. Now the speculators, those who are a bit more savvy, understood what was happening, and they began to buy all sorts of real assets, stocks or real estate and so forth. And they made out like bandits. And in this time period, since the only people who did well were the speculators, everyone took to speculating because of that was how you wouldn't make your fortune.
因此,说到底,在这段时间结束时,你知道,没有人,每个人都受到了影响,劳工受到了影响,商人阶级受到了影响,甚至富人也受到了影响。在这段时间里,唯一真正做得好的人是投机者。现在,那些投机者,那些更精明的人,理解发生了什么,他们开始购买各种实际资产,股票或房地产等等。他们像匪徒一样获利。在这个时间段里,由于唯一做得好的人是投机者,每个人都开始投机,因为这是你发财的方法。

People stopped believing and working hard, stopped believing in thrift, they just went out and speculated because of that was how you would could make it. Ultimately, of course, this all became unsustainable, crash down, and I ultimately was fixed when, you know, people lost confidence in the government and Napoleon took over. Now, I say this not because I think hyperinflation or anything like that is going to happen here.
人们停止了相信并努力工作,停止了节俭的信念,他们只是出去投机,因为那是你能取得成功的方式。最终,当然,所有这一切变得不可持续,崩溃了,最终在人们失去对政府信心并纳瓦伦接管时得以解决。现在,我说这些并不是因为我认为会在这里发生恶性通货膨胀或类似事件。

But I think it's interesting to note that when you have significant, let's see, mismanaged fiscal policy, at the end of the day, you will get inflation, you will get inflation in asset prices. And at the end of the day, I think it's the ordinary people who suffer the most unless they are aware of what's happening and then they could protect themselves. And we are early in this process, but it's just something to keep in mind. This is something that happens over and over again in history.
但我认为值得注意的是,当你有严重的、让人看不懂的财政政策时,最终会导致通货膨胀,资产价格也会上涨。最终,我认为最受影响的是普通人,除非他们意识到发生了什么并且能保护自己。我们现在还处于这个过程的早期阶段,但这是一件需要记住的事情。这在历史上一再发生。

All right, that's all I prepared for today. Thanks so much for tuning in. If you're interested in my thoughts, check my blog out at FedGuy.com, where I post weekly commentary. And of course, check out my courses at Central Banking 101. If you want to learn more about financial markets, talk to you all soon.
好的,这就是今天我准备的全部内容。非常感谢你们的关注。如果你对我的想法感兴趣,请访问我的博客FedGuy.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); }