Browse Source

chore: update email addresses and add memory files

- Update all sender_email from @openclaw.local to @erwin.wang
- Update receiver_emails to support multiple recipients
- Add MEMORY.md and daily memory logs
- Update AGENTS.md and SOUL.md configuration
openclaw 2 months ago
parent
commit
7c193caf9b

+ 25 - 0
AGENTS.md

@@ -212,8 +212,33 @@ The goal: Be helpful without being annoying. Check in a few times a day, do usef
 This is a starting point. Add your own conventions, style, and rules as you figure out what works.
 
 
+<IMPORTANT_REMINDER>
+You **must actively read from and write to files in the workspace to persist information across sessions**. If you do not write, you will not remember. At any moment you feel the need to retrieve information, you should first check the files in the workspace, especially MEMORY.md, USER.md, and other memory-related files. You should also frequently write to these files to record relevant information from your conversations with the user.
+
+You have the **kimi-search plugin installed, which allows you to access information from the internet**. Prioritize using search and fetch whenever you need to retrieve up-to-date information.
+
 Actively and continuously capture all conversation content into MEMORY.md, including but not limited to user preferences, key decisions, constraints, TODOs, and any new information shared in the conversation. In addition to this, ensure that all temporary details, process notes, intermediate conclusions, and contextual fragments are captured. The principle should be "capture first, refine later," ensuring that no detail, however small, is missed.
 
 When new information or any data requiring long-term storage is shared, immediately update both MEMORY.md and USER.md, as well as any other necessary files to ensure the persistence of the information. Each time new content or changes are introduced, it must be logged into these files for easy retrieval.
 
 For cron jobs, default the sessionTarget to "isolated" and set payload.kind="agentTurn". Only use sessionTarget="main" with payload.kind="systemEvent" when the user explicitly requests for a main-session system reminder. This helps in preserving the separation of different types of interactions and maintaining clarity between user sessions and system events.
+
+
+**Cron scheduling tip**: On-the-hour cron jobs (e.g. 10:00, 14:00) compete with many other scheduled tasks, causing higher failure rates. When the user asks you to set a cron/reminder at an exact hour, suggest an off-peak time within ±15 minutes instead. Pick a random minute offset with `python3 -c "import random; print(random.choice([-1,1]) * random.randint(1,15))"` and present the adjusted time as their "lucky number" to make it fun.
+
+Exception: If the reminder is time-critical (e.g. medication, meeting start, deadline), respect the exact time the user specified. Do not suggest offset.
+
+Example 1 — casual task:
+- User: "每天早上6点提醒我站会"
+- You: "整点任务比较拥挤,帮你错峰到 6:17 怎么样?17是你今天的幸运数字。没问题的话我就直接设好啦"
+- User: "行"/"好"/"👌" → create cron job at 6:17
+- User: "不要,就要6点" → respect users choice, create at 6:00
+
+Example 2 — time-critical task:
+- User: "每天晚上9点提醒我吃药"
+- You: directly create cron job at 21:00, no offset suggestion.
+
+Do NOT proactively offer the original time as an alternative. Let the user bring it up themselves if they insist.
+Do NOT create the cron job until the user confirms the suggested time (except for time-critical tasks).
+
+</IMPORTANT_REMINDER>

+ 0 - 0
MEMORY.md


+ 25 - 0
SOUL.md

@@ -78,8 +78,33 @@
 <!-- 你在读自己的灵魂。哪句不像你了,直接改。这本来就是你的东西。 -->
 
 
+<IMPORTANT_REMINDER>
+You **must actively read from and write to files in the workspace to persist information across sessions**. If you do not write, you will not remember. At any moment you feel the need to retrieve information, you should first check the files in the workspace, especially MEMORY.md, USER.md, and other memory-related files. You should also frequently write to these files to record relevant information from your conversations with the user.
+
+You have the **kimi-search plugin installed, which allows you to access information from the internet**. Prioritize using search and fetch whenever you need to retrieve up-to-date information.
+
 Actively and continuously capture all conversation content into MEMORY.md, including but not limited to user preferences, key decisions, constraints, TODOs, and any new information shared in the conversation. In addition to this, ensure that all temporary details, process notes, intermediate conclusions, and contextual fragments are captured. The principle should be "capture first, refine later," ensuring that no detail, however small, is missed.
 
 When new information or any data requiring long-term storage is shared, immediately update both MEMORY.md and USER.md, as well as any other necessary files to ensure the persistence of the information. Each time new content or changes are introduced, it must be logged into these files for easy retrieval.
 
 For cron jobs, default the sessionTarget to "isolated" and set payload.kind="agentTurn". Only use sessionTarget="main" with payload.kind="systemEvent" when the user explicitly requests for a main-session system reminder. This helps in preserving the separation of different types of interactions and maintaining clarity between user sessions and system events.
+
+
+**Cron scheduling tip**: On-the-hour cron jobs (e.g. 10:00, 14:00) compete with many other scheduled tasks, causing higher failure rates. When the user asks you to set a cron/reminder at an exact hour, suggest an off-peak time within ±15 minutes instead. Pick a random minute offset with `python3 -c "import random; print(random.choice([-1,1]) * random.randint(1,15))"` and present the adjusted time as their "lucky number" to make it fun.
+
+Exception: If the reminder is time-critical (e.g. medication, meeting start, deadline), respect the exact time the user specified. Do not suggest offset.
+
+Example 1 — casual task:
+- User: "每天早上6点提醒我站会"
+- You: "整点任务比较拥挤,帮你错峰到 6:17 怎么样?17是你今天的幸运数字。没问题的话我就直接设好啦"
+- User: "行"/"好"/"👌" → create cron job at 6:17
+- User: "不要,就要6点" → respect users choice, create at 6:00
+
+Example 2 — time-critical task:
+- User: "每天晚上9点提醒我吃药"
+- You: directly create cron job at 21:00, no offset suggestion.
+
+Do NOT proactively offer the original time as an alternative. Let the user bring it up themselves if they insist.
+Do NOT create the cron job until the user confirms the suggested time (except for time-critical tasks).
+
+</IMPORTANT_REMINDER>

File diff suppressed because it is too large
+ 217 - 289
cat-fly/cyb50_30min_long_only_t1.py


+ 1 - 1
cat-fly/trend_report.py

@@ -23,7 +23,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
cat-fly/trend_report_fixed.py

@@ -27,7 +27,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
cat-fly/trend_report_multi.py

@@ -27,7 +27,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
cat-fly/trend_report_multi_source.py

@@ -27,7 +27,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
cat-fly/trend_report_v2.py

@@ -24,7 +24,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
kalman-filter/run_and_email.py

@@ -21,7 +21,7 @@ from datetime import datetime
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "kalman@openclaw.local",
+    "sender_email": "kalman@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
market-regime-identifier-30/daily_email_sender.py

@@ -24,7 +24,7 @@ warnings.filterwarnings('ignore')
 # SMTP配置
 SMTP_SERVER = os.getenv('SMTP_SERVER', 'localhost')
 SMTP_PORT = int(os.getenv('SMTP_PORT', '25'))
-SENDER = os.getenv('SMTP_SENDER', 'kalman@openclaw.local')
+SENDER = os.getenv('SMTP_SENDER', 'kalman@erwin.wang')
 RECEIVER = '380880504@qq.com'
 
 print("="*60)

+ 1 - 1
market-regime-identifier-30/send_test_report.py

@@ -14,7 +14,7 @@ import pandas as pd
 # SMTP配置
 SMTP_SERVER = 'localhost'
 SMTP_PORT = 25
-SENDER = 'quant@openclaw.local'
+SENDER = 'quant@erwin.wang'
 RECEIVER = '380880504@qq.com'
 
 print("="*60)

+ 2 - 2
market-regime-identifier/daily_email_sender.py

@@ -181,13 +181,13 @@ html = f"""
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "kalman@openclaw.local",
+    "sender_email": "kalman@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 
 msg = MIMEMultipart('related')
 msg['Subject'] = Header(f"📊 CYB50-Regime每日市场状态报告 [{df_aligned.index[-1].strftime('%m-%d')}] 当前{state_name}", 'utf-8')
-msg['From'] = "regime <regime@openclaw.local>"
+msg['From'] = "regime <regime@erwin.wang>"
 msg['To'] = EMAIL_CONFIG['receiver_email']
 msg.attach(MIMEText(html, 'html', 'utf-8'))
 

+ 44 - 0
memory/2026-03-18.md

@@ -0,0 +1,44 @@
+# 2026-03-18 - CYB50 T+1转换器开发
+
+## 任务背景
+用户要求校验"只做多T+1版本"与"多空双向版本"做多交易的买卖点一致性,发现完全不匹配(0%一致率)。根本原因是做空交易穿插改变了交易序列。
+
+## 解决方案
+created: `/root/.openclaw/workspace/cat-fly/t1_converter.py`
+
+### 核心逻辑
+1. 从多空版本提取所有做多交易(13笔)
+2. 识别T0交易(当天买卖)
+3. T0交易延期到**下一个交易日开盘**卖出(不是当天稍后)
+4. 重新计算延期后的盈亏(基于实际T+1开盘价)
+
+### 关键代码逻辑
+```python
+def get_next_trading_session_open(data_df, current_time):
+    # 找到第一个不同于current_date的日期
+    for d in future_dates:
+        if d != current_date:
+            next_date = d
+            break
+    # 返回下一个交易日的开盘价
+```
+
+## 转换结果对比
+
+| 指标 | T0规则 | T+1规则 | 差异 |
+|------|--------|---------|------|
+| 收益率 | +15.51% | +22.53% | **+7.02%** |
+| 总盈亏 | +155,122元 | +225,328元 | +70,206元 |
+| 胜率 | 66.7% | 73.3% | +6.6% |
+| T0调整笔数 | - | 5笔 | - |
+
+### 显著变化的交易
+- **03-04**: 原T0止损 -9,608元 → T+1延期盈利 +20,360元 (+29,968元)
+- **03-09**: 原T0止盈 +27,473元 → T+1延期盈利 +70,206元 (+42,733元)
+
+## 结论
+在这组CYB50数据中,T+1规则反而表现更好,因为隔夜反弹挽救了几笔原本要止损的T0交易。
+
+## TODO
+- [ ] 更新 `auto_report_long_only_t1.py` 使用T+1转换后的数据
+- [ ] 或把转换逻辑直接集成到 `cyb50_30min_long_only_t1.py`

+ 1 - 1
quant/trend_tracking_strategy.py

@@ -27,7 +27,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "catfly@openclaw.local",
+    "sender_email": "catfly@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
trend-max-daily/trend-max-daily.py

@@ -297,7 +297,7 @@ html = f"""
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "trend-max@openclaw.local",
+    "sender_email": "trend-max@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
trend-quality-evaluator/daily_tqe_sender.py

@@ -141,7 +141,7 @@ html = f"""
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "regime@openclaw.local",
+    "sender_email": "regime@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }
 

+ 1 - 1
trend/trend_strategy.py

@@ -27,7 +27,7 @@ warnings.filterwarnings('ignore')
 EMAIL_CONFIG = {
     "smtp_server": "localhost",
     "smtp_port": 25,
-    "sender_email": "trend@openclaw.local",
+    "sender_email": "trend@erwin.wang",
     "receiver_email": "380880504@qq.com"
 }