Skip to main content

Posts

Visualizing Japan's Capital Flight: The "Payday Anomaly" in USD/JPY

Visualizing Japan's Capital Flight: The "Payday Anomaly" in USD/JPY The Japanese Yen has been experiencing historic weakness. While many attribute this solely to interest rate differentials or government interventions, I suspected a more mechanical, structural force at play: the automated capital flight by Japanese retail investors. The Hypothesis: The Payday Effect In Japan, the 25th of the month is the standard payday for most corporate workers. Recently, due to inflation and the new tax-free investment program (NISA), a massive number of people have set up automated monthly purchases of foreign equity index funds (such as the S&P 500 or All-Country World Index). I hypothesized that this creates an automatic, system-wide "Sell JPY / Buy USD" order triggered every single month around payday. The Code To verify this, I wrote a Python script using yfinance and seaborn to map the average daily return of USD/JPY by the week and day of the month, covering data...

Unveiling Hidden Intents: Using the Python Library "emotionics" as a Negotiation Radar

Unveiling Hidden Intents: Using the Python Library "emotionics" as a Negotiation Radar Introduction Negotiations are often clouded by bluffs, excuses, and hidden agendas. What if you could objectively peek behind the curtain? Today, I will introduce how to leverage the Python library "emotionics" not just as an analytical model, but as a powerful, objective radar for negotiations. By using the gyo (estimation) module, we can strip away superficial emotions and uncover the true physical state of the negotiation table. https://pypi.org/project/emotionics/ Code Here is a practical example. Imagine a scenario where a business partner uses a macro-environmental excuse to cut down your orders. ‘’’Python import os import json import emotionics from dotenv import load_dotenv # Load environment variables from .env file load_dotenv() # 1. Activation # * Example using Gemini emotionics.activate(     llm="gemini",     api_key=os.getenv("MY_API_KEY"),     mo...

[pip install emotionics] Python库 "emotionics" 发布

[pip install emotionics] Python库 "emotionics" 发布 Python库 "emotionics" 发布 前几天,我发布了Python库 "emotionics"。 本文是一篇针对该库的解说文章。 https://pypi.org/project/emotionics/ Emotionics是什么? Emotionics是一项将人类情感进行结构化,以便让AI更容易处理的技术。(顺便提一下,这是一个自创词。) 如下图所示,Emotionics的作用范围介于“意识与无意识”以及“逻辑与算法”之间,属于人类情感层的领域。 工作原理 Python库 "emotionics" 是将 LLM(大语言模型)与 Emotionics 结合使用的工具。 emotionics 并不是一个单纯将文本分类到特定情感标签的分类器。 它将LLM在上下文中理解的情感色彩(细微差别),结构化为预定义情感元素(如 Trust / Joy / Fear / Surprise 等)的“强度分布”并进行输出。 LLM本身负责文本的语义理解和上下文把握。 emotionics 并不直接返回LLM的结果,而是具有将情感反应重构为“方便人类后续处理的形式”的作用。 换句话说,两者的角色分工如下: • 语义理解:LLM • 情感结构化:emotionics pip install emotionics 使用方法 使用时需要OpenAI的API Key和OpenAI官方库。 Emotionics本身理论上并不依赖于特定的LLM,但目前 emotionics 库仅支持 OpenAI。 首先,通过以下命令进行安装: pip install emotionics 然后,可以按如下方式使用: import os import emotionics emotionics.activate(     llm="openai",     api_key=os.environ["OPENAI_API_KEY"],     model="gpt-5.2", ) result = emotionics.estimate(     text=...