Total Pageviews

Wednesday, 10 June 2026

搭建基于nextjs的静态博客程序amytis

 首先fork此项目https://github.com/hutusi/amytis,我fork后,得到的项目地址是

 https://github.com/brightmann/amytis

在此处 https://github.com/brightmann/amytis/tree/main/content/posts创建源帖,比如fh.mdx ,内容为:

---
title: "战马"
date: "2026-06-09T23:44:00"
excerpt: "这是一篇文章"
category: "Test"
tags: ["misc1", "misc2", "misc3"]
author: "ym"
---

此处写正文或html codes

(详见 https://github.com/brightmann/amytis/blob/main/content/posts/fh.mdx?plain=1)

然后,访问vercel.com/new, 导入项目amytis (点击import),在跳到的页面中,输入如下命令,如图:


 注意:在Build Command那栏,输入的命令应是bun run build, 不是bun build!然后,点击

deploy按钮,等待部署完成。 部署完成后,我得到的网址是

https://amytis-prh7.vercel.app/  

 https://amytis-prh7.vercel.app/posts/ 支持分页
https://amytis-prh7.vercel.app/posts/fh/ 能显示视频。

项目地址: 

 https://github.com/hutusi/amytis

  https://github.com/brightmann/amytis

演示博客: https://amytis-prh7.vercel.app/ 



 

Tuesday, 9 June 2026

如何在 Windows 中优雅的使用 sing-box

 

什么是 sing-box

sing-box 是新一代的通用代理平台,对标 Xray-core 和 clash,并且它支持多种协议(名副其实),并且性能非常强劲。

 

sing-box 客户端

截至目前,sing-box 的官方图形界面客户端支持:

而 Windows 桌面端仍在开发中,虽说有第三方图形化客户端的支持,例如:

但是这些客户端的可用性较差,很多机场提供的链接无法直接使用,并且还需要额外的学习成本。虽然官方 Windows 的图形界面客户端还在开发中,但是 NON-GUI 还是完美支持的。对于有 CLI 使用基础的朋友,本文可以帮助你在 Windows 上优雅的使用 sing-box cli。

 

安装 sing-box

这里提供两种方法安装 sing-box cli:

第一种方法不需要做过多解释,唯一要注意的是,你可能已经注意到了所有 AMD64 架构会有两个版本(darwin、linux 和 windows 都有),一个只标了 amd64,一个是 amd64v3,要如何选择呢?

这是东西是 GO 1.18 引入的 Architecture Level,不同之处在于编译器能够使用到的指令集:

  • GOAMD64=v1 (default): Baseline. 所有 64 位 x86 处理器都能使用
  • GOAMD64=v2: v1 所有的指令集,加上 CMPXCHG16B, LAHF, SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3.
  • GOAMD64=v3: v2 所有的指令集,加上 AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE.
  • GOAMD64=v4: v3 所有的指令集,加上 AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL.

简单来说就是 Level 越高,可用指令也就越新,编译出来的代码性能可能有一定提升,但是兼容性就越差。如果你不知道你的 CPU 支持什么指令集,那么用 amd64 准没错

 

第二种方法就是使用 Windows 平台的包管理器来进行安装,例如 ScoopChocolatey 等,包管理器安装方法查看官方文档就好。

# 如果你使用 Scoop

scoop install sing-box

# 如果你使用 Chocolatey

choco install sing-box

这种方法的优势是你不用在理会 sing-box 的更新等等琐事,这些事情包管理器会帮你完成。

 

配置sing-box 

如果每次使用 sing-box 都得打开 terminal 的话也太烦人,所以最好是将它配置成一个 Windows 的服务,这样我们就不用每次重启还要手动运行了,把这些工作都交给 Windows!为了实现这个目的,我们要用到 WinSW,这是一个可以将任何可执行文件配置成 Windows 服务的工具

先创建一个目录,这里我的目录就叫 sing-box,然后下载 WinSW-x64.exe,放到这个目录并将其重命名为:winsw.exe。然后我们创建一个 winsw.xml,通过这个文件对 sing-box 进行配置。注意!这两个文件的名字一定要相同,否则 WinSW 将无法读取到配置文件。

然后编辑 winsw.xml,写入以下内容:

<service>
  <id>sing-box</id>
  <name>sing-box</name>
  <description>This service runs sing-box continuous integration system.</description>
  <download from="https://你的订阅链接" to="%BASE%\config.json" auth="sspi" />
  <executable>C:\Users\homin\scoop\shims\sing-box.exe</executable>
  <arguments>run</arguments>
  <log mode="reset" />
  <onfailure action="restart" />
</service>

这里解释几个参数:

  • <download>:在指定的 <executable> 运行前,WinSW 会从指定的 URL 获取资源并将其作为文件放到本地。%BASE% 指向 WinSW 的目录,所以这里将订阅链接的内容重命名为 config.json 并放到当前目录下。
  • <executable>:指定要启动的可执行文件,这里指定为 Scoop 安装的 sing-box 的路径,这个路径可以在安装完 sing-box 之后使用:whereis sing-box 获取。
  • <arguments>:指定要传递给可执行文件的参数,这里传递的是 run。因为执行的位置就在当前路径,所以不需要指定 config.json 的路径。

完成后,使用 ./winsw.exe -h 可以查看 WinSW 的所有指令:

./winsw.exe -h

现在使用:./winsw.exe install 安装服务,安装完成后系统每次重启都会自动运行 sing-box,但是现在我们先用 ./winsw.exe start 来启动服务,你将会在当前目录下看到 winsw.wrapper.log 文件,这个文件包含服务启动时的日志,如果一切正常,那么日志应该是这样:

2024-02-07 11:34:16,941 DEBUG - Starting WinSW in console mode
2024-02-07 11:34:19,748 DEBUG - Starting WinSW in console mode
2024-02-07 11:34:19,802 INFO  - Starting service 'sing-box (sing-box)'...
2024-02-07 11:34:20,512 DEBUG - Starting WinSW in service mode
2024-02-07 11:34:20,559 INFO  - Service 'sing-box (sing-box)' started successfully.
2024-02-07 11:34:20,629 INFO  - Downloading: https://你的订阅链接 to C:\Users\homin\workspace\sing-box\config.json. failOnError=False
2024-02-07 11:34:23,004 INFO  - Starting C:\Users\homin\scoop\shims\sing-box.exe run
2024-02-07 11:34:23,043 INFO  - Started process 27484
2024-02-07 11:34:23,063 DEBUG - Forwarding logs of the process System.Diagnostics.Process (sing-box) to WinSW.ResetLogAppender

而目录中的 winsw.out.log 保存了 sing-box 运行时产生的日志。

到这里,我们已经实现了在 Windows 上无感使用 sing-box,并且实现自动更新订阅。

注意!如果出现无法使用的情况,大概率是没有允许 sing-box 访问网络,在具有管理员权限在目录中运行:sing-box.exe run,然后同意连接。如果更新 sing-box 再次出现这个问题,还是可以使用这个方法解决。

  1. https://tip.golang.org/wiki/MinimumRequirements#amd64

  2. https://github.com/winsw/winsw/blob/v3/docs/xml-config-file.md

ISR in Next.js App Router: Why Your Pages Aren't Updating

 

When building content-driven sites using Next.js App Router, many developers encounter a common issue: API data has been updated, yet page content remains unchanged for an extended period.

This is typically not due to incorrect cache configuration, nor solely because ISR is "unreliable." More often, it stems from misunderstandings about how ISR actually operates and the trade-offs it intentionally makes. This article will explain ISR's actual behavior within App Router—and the problems it can and cannot solve—by examining a real-world troubleshooting case.

Where the Problem Began

Why isn't the homepage content updating after API data refreshes?

While maintaining a content-driven website recently, I encountered an issue during testing: the homepage failed to update after new data was added to the database. Initially, I suspected Cloudflare caching the API response. Postman requests confirmed the data had updated. I then investigated caching on both frontend and backend deployment platforms but found no issues. After recompiling and redeploying the frontend code, the homepage data updated correctly. This narrowed the fault to Next.js's caching mechanism.

A Common Yet Dangerous Equation

API is dynamic ≠ Page will update

Typically, we instinctively assume that changes in API data directly trigger page content updates, following the sequence: API data update -> Page request fetches new data -> Page content updates. However, in certain scenarios, this rendering process breaks down. A commonly overlooked point is whether the page is regenerated—meaning there's a disconnect between data changes and page generation.

We often mistakenly treat Next.js's App Router data fetching as a reactive system that automatically propagates data changes. The official documentation describes it thus:

Caching is a technique for storing the result of data fetching and other computations so that future requests for the same data can be served faster, without doing the work again. While revalidation allows you to update cache entries without having to rebuild your entire application.

This indicates that Next.js's rendered page results can be reused.

What Problem Does ISR Solve?

Before ISR, content-focused sites faced a dilemma:

  • Pure SSG: Stable pages but delayed updates, leaving users seeing outdated content
  • Pure SSR: Timely content delivery but high server load and response times

Unlike e-commerce sites demanding real-time updates, content-driven sites typically require less immediate data freshness—yet they cannot remain static forever. ISR emerged precisely to bridge this gap. ISR was designed to strike a balance between SSG and SSR, enabling pages to leverage the performance benefits of static generation while maintaining content updates within acceptable timeframes.

ISR's design assumptions:

  • Delay is tolerable
  • Inconsistencies are temporary

ISR's core objective is trading time for stability—exchanging predictable latency for deployment and caching benefits. It is not designed for frequently changing data and inherently does not pursue real-time updates.

How ISR Actually Works

When exactly does a page update? It's not "auto-refreshing every N seconds," but rather triggering an update upon the "next visit" after exceeding N seconds.

Contrary to first impressions, ISR isn't a background refresh timer. When the revalidate cycle arrives, pre-generated pages don't update immediately—they wait for the next user visit to trigger the update.

Example:

  • A page set to revalidate: 60 means content can update every 60 seconds
  • User A visits the page at 12:00:00; the page is generated and cached
  • User B visits the page at 12:00:30; the content displayed remains what User A saw
  • User C visits the page at 12:01:05; the revalidate cycle expires, triggering page regeneration in the background, but User C still receives the stale response
  • User D visits the page at 12:01:10, and the page content updates to the latest version, triggered by User C's visit

From the above example, it's clear that page updates in ISR are passively triggered—checking for regeneration only occurs when a user visits. This means delayed visibility is a deliberate design choice, not a flaw.

Advantages and Trade-offs of ISR Compared to Other Rendering Strategies

This is not an evolutionary path, but a trade-off

ISR vs. SSG:

  • Solves the problem of long-term static content by enabling periodic page updates, though not real-time
  • Retains the caching benefits of static generation: fast response times and low server load

ISR vs. SSR:

  • Reduces server load; stable, cacheable content lowers costs
  • Sacrifices real-time content; introduces latency and inconsistency, cannot guarantee freshness on every visit

ISR offers predictable behavior and controllable costs, but isn't suitable for scenarios requiring strong consistency or real-time updates. ISR isn't an upgrade over SSR/SSG—it's a distinct choice

dynamic vs revalidate

dynamic is not a "bug switch," but a solution for different scenarios

In Next.js App Router, dynamic and revalidate are distinct rendering strategies: dynamic determines "whether to render each time," while revalidate determines "whether to reuse old pages."

When a site's content must reflect the latest state on every visit, or when content is highly context-dependent, delayed visibility is unacceptable. dynamic re-renders on every visit, making it ideal for this scenario. Conversely, when page content is relatively stable, revalidate offers a suitable solution. It trades time for stability by allowing some delay.

If I notice a site's homepage isn't updating promptly, I might choose dynamic to ensure fresh content on every visit. This seems like a solution, but it merely shifts the problem to a different scenario. dynamic and revalidate aren't mutually exclusive choices—they represent different rendering strategies for distinct requirements.

Page-Level Revalidation vs. API-Level Revalidation

Granularity depends on consistency requirements, not flexibility

Consider a news site homepage with multiple sections: Today's News, Yesterday's News, etc. When these sections fetch data from separate APIs and use API-level revalidation, this scenario may occur: Today's News remains unchanged while Yesterday's News updates. If spanning multiple days, this could even create a disjointed scenario where Yesterday's News appears more recent than Today's News—directly undermining the site's credibility.

For pages aggregating multiple APIs, API-level revalidate struggles to guarantee content consistency. As the final delivery point, the aggregated page should shoulder consistency responsibility, making page-level revalidate more advantageous. Similarly, if a page's content originates from multiple interfaces but lacks strict suppression requirements between modules, API-level revalidate may be considered for higher performance. Ultimately, the choice of revalidate granularity should be based on the page's consistency requirements, not flexibility.

ISR Behavior in Low-Traffic Content Sites

Why does the website seem broken?

As mentioned earlier, ISR can be configured to revalidate, triggering page updates on the user's next visit. When site traffic is very low, page refresh frequency drastically decreases, potentially leading to pages remaining unchanged for extended periods. When users visit such pages, they may see content that is days or even weeks old, creating the impression that the website is "broken."

This is actually an intended outcome of ISR design. When User A visits a page, they see content generated long ago, and their visit triggers a page re-generation. However, due to the potentially days-long intervals between visits on low-traffic sites, by the time User B visits next, the page content remains the version last updated by User A. Consequently, User B still sees outdated information.

For low-traffic content sites, traffic volume may dictate content refresh frequency. As long as this aligns with the original design intent and is acceptable, this "lazy updating" behavior is reasonable and does not indicate a "broken" website.

Does ISR Lead to Out-of-Sync Pages?

This is not an issue requiring excessive concern

While ISR implementation may indeed encounter scenarios of content asynchrony, this represents a design trade-off that should be understood and accepted—not an issue warranting undue alarm. ISR's architecture inherently permits transient inconsistencies. Rather than fixating on "whether inconsistencies occur," the critical question is whether such inconsistencies are predictable. During design, clearly define the content site's actual consistency requirements. Analyze when inconsistencies might occur and whether their potential impact is acceptable—rather than blindly pursuing timeliness or uniformity. When content inconsistencies are controllable and predictable, "page asynchrony" ceases to be an excessive concern. It becomes a known factor in the design.

Time-Driven Content ISR Strategy

Take the homepage I maintain as an example. It aggregates "Future Content" and "Latest Content" modules—time-driven content where "Future Content" manages content beyond today, while "Latest Content" manages content from today and earlier.

This introduces a trade-off between consistency and flexibility. Opting for API-level revalidate would make a module's caching strategy independent of the page, turning the homepage into an "assembled snapshot." For my homepage, this unnatural state is unacceptable. Furthermore, the homepage has a stable structure with changes occurring only at the content layer. Therefore, page-level ISR is more suitable as the overall invalidation strategy. A page-level strategy allows my pages to update and expire synchronously as a whole, avoiding a state where "part is new and part is old." This aligns with my business semantics.

Data updates on my site occur concentrated at a specific time point within a day. There is only one critical change window per day, with data remaining largely stable at other times. Setting revalidate to one day could easily result in users accessing the page before the critical window, followed by no refreshes for the entire subsequent day. Given the site's low traffic, revalidate effectively functions as "the maximum number of visit opportunities I'm willing to let this page miss daily." Considering the homepage doesn't require minute-level real-time updates, yet I also don't want it displaying stale data for half a day or an entire day, I set revalidate to 1 hour. This ensures that even with low traffic, there are 24 opportunities daily to trigger a page refresh. As long as one user visits after the critical window, they will likely see the updated data.

Why not use a smaller value, like 5 minutes? Because based on the project's actual circumstances, it's unnecessary. Setting revalidate to 5 minutes would make the page behave almost like dynamic rendering, while retaining the complexity of ISR without significant benefit. Most importantly, the business can tolerate the current threshold of latency. For me, ISR's revalidate isn't a caching parameter, but a way to model the business rhythm.

When to Transition from ISR to On-Demand Revalidate

The decision to transition to on-demand revalidate doesn't hinge on technical maturity, but on whether the "content update -> user visibility" chain begins impacting user trust.

My current site updates only during a single daily critical window, with low traffic and users likely in exploratory or occasional visit phases. Their expectations lean toward "stability" rather than "timeliness." Transitioning becomes necessary if:

  • Users start treating my site as a "near-real-time information source"
  • Data update frequency increases/becomes irregular
  • Users frequently report outdated content

This indicates my site's content has shifted from time-driven to event-driven, with users demanding greater real-time relevance. At this point, transitioning from ISR to an on-demand revalidate mechanism becomes necessary. In other words, when users begin perceiving "uncertainty in update timing," it's time to reconsider rendering strategies. On-demand revalidate represents a distinct approach for the site's new phase—not merely a patch for ISR.

Conclusion

ISR isn't unreliable—it's just placed under the wrong expectations.

ISR is valid only when site content can tolerate delays and brief inconsistencies, and when access frequency is unstable. Software engineering has no silver bullets, and ISR isn't omnipotent. The key isn't whether to use ISR, but whether you're willing to accept its inherent delays and inconsistencies. Understand ISR's design trade-offs and choose the appropriate rendering strategy based on business needs.


References

------------------------------------------

Isr,  incremental static regeneration

增量静态再生,它是SSR和SSG的结合。当一个ISR路由被访问时,页面会像SSR一样生成并存储在缓存中,然后提供给客户端。之后任何访问都会直接从缓存中获取渲染后的内容。你可以设置TTL或者无限期地保留缓存,直到你手动重新验证该路由,导致下一次访问该路由时重新以SSR方式渲染并重新缓存。

这对于例如博客文章来说非常棒。你可以无限期地缓存博客文章,当管理员编辑博客文章时,你重新验证特定的博客文章路由。这意味着更少的数据库调用,更少的服务器运行时,这转化为更少的支付给托管平台的费用... 

------------

 https://juejin.cn/post/7453286740078526516

-----------------

 

ISR(Incremental Static Regeneration)是一种Web前端开发中的静态网页生成技术。它是Next.js框架引入的一项功能,旨在改进静态站点的性能和用户体验。在了解ISR之前,我们需要先了解几个相关的概念。

静态网页生成(Static Site Generation)

静态网页生成是一种生成静态HTML文件的技术,它将数据与页面内容结合,一次性生成所有页面。这种方法的优势在于提高了网站的加载速度和性能,因为访问者可以直接获取静态HTML而无需等待服务器处理。

服务器端渲染(Server-Side Rendering)

服务器端渲染是在每次请求时动态生成HTML页面的过程。这意味着服务器负责渲染页面的内容,并将最终的HTML发送给客户端。这种方法的好处是可以在每次请求时动态地生成页面,以确保始终提供最新的数据。

预渲染(Pre-rendering)

预渲染是一种在构建时生成页面的技术,它不像静态网页生成那样在每次请求时生成。这样可以减轻服务器的负担,但在某些情况下可能会导致页面内容过时。

ISR 的工作原理

ISR 结合了静态网页生成和服务器端渲染的优点。它的核心思想是在构建时生成静态页面,然后在运行时根据需要进行更新。这意味着你可以预先生成大部分静态页面,然后根据用户的请求,在需要时再重新生成某些页面。

在 Next.js 中,ISR 是通过在页面组件中使用 getStaticProps 函数实现的。这个函数在构建时运行,用于获取页面所需的数据。通过在 getStaticProps 中使用 revalidate 选项,可以指定页面的重新生成时间,即多长时间后页面内容将被更新。如果用户在这段时间内访问该页面,他们将获得旧的静态页面,而同时,Next.js 会在后台异步重新生成新的页面内容,并在下一次请求时提供更新后的页面。

ISR 的优势

  1. 提高性能: ISR 允许大部分页面在构建时生成,从而提高了网站的加载速度。用户可以立即获取静态页面,而不必等待服务器响应。
  2. 实时数据 与传统的静态网页生成不同,ISR 可以在需要时动态更新页面内容。这意味着你可以在不牺牲性能的情况下获取实时数据。
  3. 降低服务器负担: 由于大部分页面在构建时生成,服务器无需在每次请求时都动态生成页面,从而降低了服务器的负担。

举例说明

假设我们有一个博客网站,每篇博客文章都是一个页面。我们希望实现ISR,以便在用户访问每篇文章时,能够提供最新的内容。

  1. 创建博客文章页面

```jsx // pages/blog/[slug].js

import { useRouter } from 'next/router'; import { getStaticProps } from 'next';

const BlogPost = ({ postData }) => { const router = useRouter();

if (router.isFallback) {
   return <div>Loading...</div>;
 }

 return (
   <div>
     <h1>{postData.title}</h1>
     <p>{postData.content}</p>
   </div>
 );

};

export async function getStaticPaths() { // Fetch the list of blog post slugs const paths = getBlogPostSlugs();

return {
   paths,
   fallback: true, // Set to true to enable ISR
 };

}

export async function getStaticProps({ params }) { // Fetch necessary data for the blog post using the slug const postData = getBlogPostData(params.slug);

return {
   props: {
     postData,
   },
   revalidate: 60, // Regenerate page every 60 seconds (1 minute)
 };

}

export default BlogPost; ```

  1. 启用 ISR

在上述代码中,我们通过设置 fallback: true 启用了 ISR。这意味着如果用户访问的页面在构建时不存在(例如,新发布的博客文章),Next.js 会在后台重新生成页面并提供更新后的内容。同时,我们通过 revalidate 选项指定了页面重新生成的时间间隔。

这样,用户可以立即获取现有的静态页面,并在稍后获取更新的内容,而不必等待重新生成。

总体来说,ISR 是一项强大的技术,能够在静态网页生成和服务器端渲染之间找到平衡,提供高性能和实时数据更新的优势。在构建现代Web应用程序时,特别是对于内容频繁变化的页面,使用ISR可以显著改善用户体验。

SSG 是预先生成网页的过程,这意味着在构建阶段,我们会生成所有可能的页面并保存下来。然后,当用户请求一个页面时,我们只需从存储中获取预生成的页面并将其发送给用户。这种方式的好处是,因为页面已经预生成,所以响应速度非常快。然而,对于内容经常变化的网站来说,SSG 不是一个理想的选择,因为每次内容更新,都需要重新构建整个网站。

SSR 则是在用户请求一个页面时,服务器会生成并返回该页面。这意味着每个请求都会触发一个生成页面的过程。这种方式的好处是,能够处理内容频繁更新的情况。然而,因为每个请求都需要生成页面,所以可能会增加服务器的负担,并且可能导致响应时间变慢。

ISR 试图将 SSG 和 SSR 的优点结合起来。在 ISR 中,页面在构建阶段会被预生成,但是可以设置一个 fallback 参数来处理那些未在构建阶段生成的页面。当用户请求一个未预生成的页面时,Next.js 会在后台生成该页面,并返回一个 “fallback” 页面给用户。一旦页面生成,Next.js 会保存它,以便下次请求时可以立即返回。

另外,ISR 还引入了一个 revalidate 参数。这个参数定义了在多长时间后,页面应该被重新生成。例如,如果 revalidate 设置为 1,那么每隔 1 秒,Next.js 会检查页面是否需要更新。如果需要,Next.js 会在后台重新生成页面,并在下次请求时返回新的页面。

让我们以一个博客网站为例来说明 ISR 的使用。假设我们有一个博客网站,其中包含数千篇博客文章。每篇文章都有自己的页面,而且每天都会有新的文章发布。

如果我们使用传统的 SSG,那么每次新文章发布时,我们都需要重新构建整个网站,这将花费大量的时间和计算资源。如果我们使用 SSR,那么每次用户请求一篇文章时,我们都需要在服务器上生成那个页面,这可能会使服务器的负担加重,并可能导致响应时间变慢。

Monday, 8 June 2026

6月5日,美股暴跌的背后

 

华尔街向来不怕坏消息,真正令人恐惧的,却是当下那些看似美好的消息。

6月5日,美国公布5月非农就业数据,新增17.2万个工作机会,远高于市场预估的8万至9万人区间;失业率维持在4.3%,显示劳动市场依然稳健。若放在一般景气循环之中,这样的数字理应被视为经济韧性的象征。然而市场的反应却截然相反。

从非农就业数据开启的市场震撼

当天,美股迎来近年罕见的“黑色星期五”全面性抛售。纳斯达克指数(NASDAQ Composite)暴跌4.18%,费城半导体指数(SOX)重挫超过10%,创下疫情以来最大单日跌幅;AI概念股、晶片股、资通讯族群全面崩跌,短短一天内,美股蒸发超过一兆美元市值。

这场暴跌表面上由就业数据触发,但若将原因简化为“市场担心升息”,恐怕低估了事件背后更深层的讯号。真正值得关注的,不是17万个新增工作机会本身,而是这个数字所揭露的美国经济的结构性矛盾。

这场急跌的股灾,实际上可能是市场首次集体开始定价一种全新的总体经济风险,亦即指向AI时代停滞性通膨的疑虑。

市场害怕的不是经济太差,反而是经济太好

金融市场最常出现的悖论之一,是当“好消息变成坏消息”的忧虑时刻。此次非农数据最大的冲击,在于其远远超出市场预期。更重要的是,3月与4月就业数据被大幅上修,使得最近3个月平均新增就业逼近19万人。

换句话说,市场原本期待看到的是经济逐渐降温,进而为联准会(Fed)降息创造空间;但最新数据却显示,美国劳动市场仍然异常强劲。

问题在于,美国当前面对的并不是低通膨环境。能源价格因中东局势持续紧张而居高不下,油价与天然气价格涨幅明显;关税与供应链重组则推升进口商品成本。在通膨仍高于联准会目标之际,就业越强,意味着需求越稳定,也意味着联准会越难启动降息循环。

因此,市场看到的并非经济复苏,而是利率可能走向更高,且时间维持得更久。这也是当天美债殖利率急升、美元大涨的核心原因。投资人恐惧的从来不是今天的经济,而是未来的货币政策。

科技股崩跌,本质上是对利率重新定价

过去两年,美股追逐人工智慧(AI)热潮建立在两个前提之上。第一,人工智慧将带来新一波产业与生产力革命;第二,联准会终将重启降息周期。前者提供产业成长故事,后者提供AI科技产业公司估值支撑。

当就业数据公布后,第二个支柱开始动摇。市场原本仍保留对年底降息的期待,但最新数据几乎将降息预期完全消除,甚至开始重新讨论升息的可能性。这对科技股而言,这是致命的打击。因为AI产业最大的特征,就是高度依赖未来现金流

无论是辉达、AMD、博通,还是光通讯设备商,投资人愿意给予极高本益比,本质上是在提前折现未来数年的成长。而利率越高,折现率越高,未来价值便被压缩得越厉害。

因此,这次费半指数两天蒸发超过一成、市值缩水超过一兆美元,并不完全代表市场否定AI前景,而是开始重新评估,如果高利率时代延长,这些公司究竟值多少钱?这是一场典型的估值修正,而非基本面崩溃。但问题在于,估值修正往往只是故事的开始。

17万新增就业人数的背后,藏着就业结构恶化

如果只看总体数据,美国就业市场确实强劲。但是市场担心的,是数字背后的结构。

首先,是薪资问题。5月平均时薪年增率约3.4%,而通膨率约3.8%。这代表美国劳工实质薪资仍在倒退。意即名目收入增加,但购买力下降。从民众的真实生活感受而言,这不是繁荣,而是收入被通膨吞噬而减少。

其次,是新增就业的产业分布。新增就业主要来自医疗、地方政府与观光服务业;相反地,金融、资通讯科技等高薪产业则持续缩减。换句话说,支撑美国就业的,是饭店服务员、护理人员与公部门职位;被裁减的,则是金融分析师、软体工程师与客服人员。

这种结构透露,就业数量在增加,但就业结构的失衡与矛盾。而且,AI正是推动这股趋势的重要力量。企业一方面持续投入AI基础建设,另一方面则利用AI取代部分白领工作。结果便形成资本支出创新高,但部分中产阶级工作却逐渐消失的吊诡现象。显示出,市场担忧的不是失业潮立即出现,而是劳动市场正在发生深层重组。

AI繁荣背后的经验幻象

更值得注意的是,美国当前的经济成长,很大程度上来自AI投资热潮。当亚马逊(Amazon)、微软(Microsoft)、谷歌(Google)与Meta等科技巨头,今年资本支出规模大幅扩张,数据中心建设也如火如荼,其投资也支撑了GDP与企业获利,但问题在于,投资不等于生产力。

目前市场尚未看到AI投资与整体生产率提升之间出现明确的对应关系。换句话说,美国正在投入天文数字用以建设AI基础设施,但其带来的经济效益仍停留在预期阶段。于是形成资本投入已经发生,回报却尚未兑现的特殊现象,这一直是市场担忧的泡沫风险。

从总体角度来看,这种情况与历史上许多科技泡沫初期极为相似。铁路与网际网路发生泡沫的环境类似,投射到今日的AI发展疑虑,表现为市场最大的风险不在于AI产业蓬勃发展,而在于担忧回报速度跟不上投入速度。

新型停滞性通膨:油价与AI共同塑造的新风险

近来“停滞性通膨”重新成为华尔街热门词汇。许多人认为停滞性通膨必须伴随高失业率,但事实并非如此。

停滞性通膨的核心,是实际购买力停滞与通膨并存。这正是当前美国经济开始显露的特征。一方面,中东地缘政治推高能源价格;另一方面,AI资料中心建设带来庞大电力需求,进一步推升能源成本。

油价为通膨提供燃料,AI则放大能源需求。结果便形成一种前所未有的矛盾组合:一边是高昂的资本投入与基础建设热潮;另一边则是实质薪资停滞与生产率回报延后。

不过,与1970年代不同的是,这次的通膨不只是石油问题,而是石油与AI共同驱动的供给面冲击。这可能是全球经济首次面对“人工智慧型停滞性通膨”。

联准会的两难,也是市场的焦虑

这正是当前新就任联准会主席凯文·华许(Kevin Warsh)所面对的首份考卷与经济困局。

若AI投资放缓,美国经济可能失去最重要的成长引擎,需要降息支撑景气;但若能源价格居高不下、通膨黏着,降息又可能导致物价进一步失控。降息有风险,升息也有风险。维持高利率不变,可能持续压制科技股估值。对市场而言,最可怕的从来不是答案,而是不确定性。

“黑色星期五”的美股暴跌,表面上是一场科技股估值回调;本质上却是一场总体经济情势的重估。投资人突然意识到,AI或许仍是未来十年的经济与产业发展的主旋律,但在抵达那个未来之前,美国经济可能必须先穿越一段高利率、高能源成本与生产力尚未兑现的过渡期。而且,这段过渡期,或许比人们想象得更加漫长.

赖岳谦:中国出重拳!日本熬不住

情人桥

送君, 原唱: 周璇