sunlc.ai

sunlc.ai

HODLer/Defi Farmer❌/Quant❌/Arbitrager❌ Founder Of Bewin Quant (An AI-Driven Quantitative Hedge Fund)

1Following
153followers

Feed

sunlc.ai
sunlc.ai
"Old Sun Takes You to Build a Financial Terminal System Worth Millions 2: Developing Workflow" Today is Saturday, a day off, and I'm too lazy to write a long article, so I'll just talk about the current workflow and precautions: 1. Claude Opus 5 is mainly used for module function design, especially when you haven't fully figured out the functionality of a new module. You can brainstorm more with Claude. Claude will ask you questions step by step to gradually understand your needs and provide a design document that exceeds your expectations. After the initial draft is completed, hand it over to Codex for review and supplementation to form the final development document and plan. All documents are saved in md format under the docs directory. 2. Development uses Codex; the screenshot shows my Codex workspace. The most important thing is to remember to open a separate thread for each functional module (see Figure 1). The benefits are, first, the context won't get mixed up, and second, multiple independent modules can be developed in parallel. Also, Codex can create an interactive demo page before formal development, where you can directly annotate and modify to ensure the final finalized requirements are correctly understood. The overview module in the screenshot is relatively simple, so I directly discussed requirements with Codex. For complex requirements, it's recommended to discuss with Claude first. 3. The entire development environment is completed inside Docker, which facilitates subsequent maintenance and deployment. 4. Before developing the entire system, discuss clearly with Claude the system positioning, main functional modules, architecture, page style, performance requirements, etc., and solidify these constraints in agents.md. For example, in my system, the backend uses Python FAST API, and the database uses ClickHouse, all decided through discussions with Claude. The frontend uses a professional financial terminal style; you can have Claude and Codex each design several styles to choose the favorite for finalization. 5. After each module is developed, Codex must first perform self-testing, then manually check if the interface layout is correct and data is accurate. Data accuracy is the most important for financial terminals and also where AI is most prone to hallucinations, so manual careful verification is essential. This is also the most time-consuming part. 6. After completing the above step, have Claude perform code review (see Figure 2). The prompt can be written like this: "I had Codex complete the development of the xx module according to the xx development document. Please conduct a detailed review of this module's code, including but not limited to consistency between code and documentation, data accuracy, indicator calculation formulas, page layout, module performance, code conciseness, and reusability, and provide optimization suggestions. Save the review results in xxx_audit.md according to the severity of issues." 7. After Claude's review is complete, let Codex re-examine the review comments and provide the final plan. The prompt can be: "I had Claude conduct a code review of the xx module you developed; the review report is in xxx.md. Please objectively evaluate this report, re-check the code one by one, and provide final modification suggestions and plans saved in md. Be careful not to over-modify." Codex often over-modifies minor issues, so the last sentence is very important. 8. Finally, let Codex complete code modifications and self-testing according to the modification plan, then Claude reviews again. Generally, there won't be major issues. 9. Use GitHub for version control throughout development, especially when multiple modules are developed in parallel, allowing multiple branches and letting Codex manage versions well. 10. After each module is completed, Claude can summarize the module's function introduction into the readme.md document and update installation manuals, user manuals, and other documents. Also, regularly integrate, summarize, and delete outdated documents from the development process. 11. I connected Codex with Obsidian so that context and historical memory can be better preserved. You can ask Codex directly for specific methods. 12. As the system develops and modules increase, regular overall code optimization and simplification can be performed. For example, which code and common modules can be extracted (this should ideally be designed from the start, but AI inevitably produces some duplicate code later, so extracting it improves maintainability). Generally, one round of optimization can reduce code by 10%-20%. However, after each optimization, the entire module needs to be retested, which is quite laborious."
sunlc.ai
sunlc.ai
I've been saying that quality software stocks will gradually pick up, but honestly, holding software stocks has been quite a poor experience. At the beginning of June, my system caught four undervalued quality software stocks: NOW, CRM, WDAY, and INTU, and I built positions in all of them. After building the positions, they consolidated sideways for more than a month. Last week, wanting to add to SOXX, I sold CRM, WDAY, and INTU, and just after selling, these stocks started to rise. Buying software stocks requires enough patience to hold long-term and wait for them to slowly realize their value. With the current rise of open-source large models, I believe this will be beneficial for these software companies going forward, and any pullbacks are opportunities to continue building positions.
sunlc.ai
sunlc.ai
"Old Sun Takes You to Build a Financial Terminal System Worth Millions 1: Overall Concept and Architecture" I originally promised to start updating yesterday, but got delayed due to some matters. Today, I officially start updating the first article. Although all my code is written by AI, I have always insisted on typing every word of all tweets by hand, not even using typeless, because AI-written articles lack a human touch. The update speed may not be very fast, but I will definitely keep updating. The first article will explain why I want to build this system, the overall concept, the building cost, and the system's overall architecture. 1. Why build this system I not only do various quantitative and arbitrage trading in the crypto space but also invest in US stocks. I have always attached great importance to macro research and need a terminal that can integrate so much information daily for quick browsing and decision-making. When I worked in professional institutions before, the company would provide Bloomberg and Reuters terminals costing over a hundred thousand per year, which obviously individual users wouldn't afford. Now with AI, I want to build one myself. At the beginning of the year, when openclaw was popular, I tried to build a set but eventually chose to abandon Lobster and upgrade to the current terminal. The main reason is that openclaw, as an AI agent, is convenient for handling some daily small tasks, but since most tasks are script-based, it still has randomness and instability issues when processing financial data, which is fatal for financial data that requires extremely high quality. So from March, I started rebuilding this system using codex+claude. This system is tailor-made for me, completely based on my trading strategies, trading varieties, and even my daily routine. The display resolution is customized for my 48-inch 4K screen to ensure that the key information I care about can be displayed on one screen as much as possible. So what you can learn from my entire sharing process is not only the system building process but also my entire investment philosophy, which is far more valuable than just open-sourcing the code. 2. Building cost AI models: claude 200U subscription + gpt 200U subscription + grok 30U subscription (from Twitter membership). Mainly use claude's opus 5 max for overall system architecture design and functional module design, then hand over to codex's gpt 5.6 sol max for development and self-testing, and finally to claude for final review and acceptance testing. Server: A MAC MINI M4 16G is sufficient, built at home, then accessed externally via Cloudflare. Specific details will be explained later. Data sources: The system currently has nearly 30 external data sources, most of which are free. The only paid ones are FMP's 20U subscription and IB's 10U data fee, which already meet most needs. 3. System architecture In one sentence: a terminal that integrates crypto + US stocks + macro three main lines. The system adopts a completely decoupled front-end and back-end architecture: Back-end is fully encapsulated in Python as Fast API Front-end uses React + Ant Design framework Database uses ClickHouse Development and deployment are done entirely with Docker. Current system architecture includes: 9 crypto exchanges (unified access via CCXT) 26+ external data sources covering market data, macro data, on-chain data, Twitter news, on-chain anomalies, AI-related news, etc. 40+ work processes running in the background to update various data and indicators regularly 213 US stock AI-related research targets 78 data tables in the backend ClickHouse Over 560 configuration and runtime items It can be said to be very finely split. Current system functional modules mainly include: The overview page can display all the core data I care about on one screen, including macro indicators, crypto indicators, major event news, watchlist market data, arbitrage opportunities, and system status. The arbitrage page shows crypto positive/negative fee rate arbitrage, US stock and RWA target arbitrage, futures-spot premium, OI anomalies, and other important information. The US stock page shows over 200 AI-related targets I follow, with a focus on 30 core targets. This is the core module of my entire system and an important basis for my US stock investment decisions. The IB account and crypto account modules allow easy viewing of all my holdings spread across various exchanges and sub-accounts. The Twitter news module uses grok to collect AI and macro news hotspots I focus on every morning and evening, then uses LLM to summarize and organize them into Twitter morning/evening reports at 7:30 AM and 10 PM respectively. The US stock daily report collects market data and news one hour after US market open (10:30 PM) and at morning close (7:30 AM), organizing them into a daily report based on the data indicators I follow. The above Twitter and US stock daily reports are fully customized according to my daily routine. After waking up at 7:30 AM, I can know the overnight market trends and hot news within 5 minutes. Similarly, one hour after US market open, I can promptly know the day's information and usually make all trading decisions before 11 PM, never staying up late. Additionally, I developed an AI research report library feature. I bought a large number of professional AI industry research reports such as Semi Analysis, FundAI, Damnang, etc. These reports are very large and professional, sometimes hard to fully understand by myself. I put them all into the research report library and use LLM to dissect and analyze them, forming a very powerful research tool. There are also multiple dashboards for options, meme coins, US bonds, USD, inflation, etc., all information I pay attention to daily. Starting tomorrow, I will break down the functions, design ideas, and development methods of each module one by one. Feel free to leave comments for discussion if you have questions. I have a strong dislike for stupidity, so I won't answer overly basic questions or requests for source code directly.
sunlc.ai
sunlc.ai
Those who didn't come to the live broadcast on 7/29 missed out; that night was the major bottom of this pullback.
Mercy_okx
Mercy_okx
A great miracle day! The judgment made in the live broadcast the day before yesterday was verified by the market today In the live broadcast on the planet the night before last, @sunlc_crypto repeatedly gave precise judgments: Storage is undergoing the growing pains of transitioning from a cyclical stock to a growth stock, and extreme panic may actually bring better layout opportunities; meanwhile, high-quality software companies that were heavily oversold earlier will also see a revaluation. Last night, the US stock storage sector rebounded strongly: Roundhill Memory ETF rose 16.7%, Micron rose 18.4%; Microsoft surged 15.5% after its earnings report, marking the largest single-day gain in nearly 18 years. The Korean stock market continues to rebound, with SK Hynix surging intraday, though the real-time gains are still fluctuating. The market gave feedback in just one day. But more important than predicting rises and falls is: when the market falls into panic, how to distinguish which are trend endings and which are just mispricings of quality assets. This is only a preview. For those who can't wait for the premium edit, you can first go to OKX Planet to watch the full replay. The complete premium edit will be available in two days~
sunlc.ai
sunlc.ai
The IB US stock account's YTD return has returned to 40%, with the highest point being 50% on 6/2. This return rate isn't very high but is steady. I never use leverage, never short sell, keep 80% of the time fully invested in AI stocks, and always maintain enough funds outside the market to add positions. This recent dip has brought the average prices of several core stocks to a very comfortable level: NVDA 192, AVGO 380, MSFT 390, GOOG 335, NOW 95, DRAM 47. Most of these prices are even lower than at the beginning of the year, so I can hold them long-term with peace of mind. There is no stock god in this world; the one who lives long is the stock god. Those white-haired stock gods, ByteDance stock gods, and genius teenagers are just short-lived flashes. And those KOLs from the crypto circle who started by speculating on meme coins are essentially just gamblers. They use meme coin speculation methods to trade US stocks, so whatever they earn, they lose back. Why do I never touch meme coin altcoins? Because the dopamine from gambling is very strong, and once addicted, it's impossible to do value investing anymore. No matter how much money you make, you can't break this bad habit.
sunlc.ai
sunlc.ai
The value of this tweet is also increasing I also said in yesterday's live broadcast that I continue to be optimistic about MSFT, GOOG, NOW, etc. Only if they make money can the AI story continue.
sunlc.ai
sunlc.ai
Next, let's talk about my views on the software and application sectors: I believe the software and application sectors are currently severely undervalued and have been completely oversold. After the hardware sector enters a high-level adjustment phase, capital will gradually flow into quality software stocks to restore their valuations. The previously held market logic that large models will kill software companies does not hold, for several reasons: 1. For enterprises, the most important aspects of software are data accuracy and reliable workflows. Products like NOW and CRM have already deeply embedded themselves into many companies' entire workflows. For most enterprises, it is impossible to replace them easily, let alone choose to develop large models in-house. User stickiness is extremely strong. 2. The market worries that the current software seat-selling model will decline due to corporate layoffs. This concern may be valid in the short term, but in the long term, it is actually beneficial. For software companies, transitioning from selling seats to selling usage is not difficult. For enterprise clients, layoffs are due to AI replacement; in the future, software users will gradually be replaced by AI. Originally, one seat worked 5*8 hours per week; after replacement by AI, it will work 7*24 hours, increasing software usage by 4 times. 3. The current AI penetration rate is still very low. The direct users of large models are mainly cutting-edge technical personnel. To enable most people to use AI in the future, the usage form will definitely not be direct use of large models, but rather AI being seamlessly embedded into commonly used software such as chat software, office software, video software, etc. From this perspective, platform companies with massive customers like MSFT and META are currently severely undervalued. 4. The progress of AI large models is a huge negative for programmers but a major positive for software companies. The biggest cost for software companies is labor cost. Within the next 3 years, they can definitely eliminate two-thirds of developers, significantly improving software company profits. 5. Hardware companies sell shovels, software companies dig for gold. Now that all the shovels have been sold, whether gold can be found depends on software companies. I personally am strongly optimistic about MSFT, GOOG, NOW, CRM, and other targets. (META is actually not bad, but I have no confidence in Zuckerberg.) In the future, many innovative application software companies will emerge, and many companies without moats will be eliminated. Therefore, I do not recommend blindly buying IGV, as it contains too many companies.
sunlc.ai
sunlc.ai
The interest rate market currently predicts a 60% probability of a rate hike in September and an 87% probability of one rate hike within the year, a significant drop compared to before the meeting. The hawkish talk has temporarily achieved its effect. If subsequent inflation data continues to decline, it is indeed possible to hold off on rate hikes for the rest of the year. But it's uncertain how long the "wolf is coming" game can last.
sunlc.ai
sunlc.ai
The market is currently most focused on the Federal Reserve's interest rate decision early tomorrow morning. According to the interest rate market pricing, the probability of a rate hike is about 35%, while Polymarket prices it at about 25%. Here are three scenarios: A: If there is no rate hike in July, Warsh's post-meeting remarks will most likely be hawkish, making a rate hike in September almost certain. According to the usual pattern, at least two rate hikes are needed, so it would be two hikes on 9/16 and 10/28. Although the market may rebound in the short term, it will live in fear for the next few months, which is very unfavorable for the midterm elections. B: If there is an unexpected rate hike in July, there will most likely be a second hike in September. Although this is a huge short-term negative for the stock market and may cause a final drop, completing the rate hikes quickly within a month and a half means short pain is better than long pain, allowing the market to bottom out faster, which is beneficial for the midterm elections. Also, the market is already at the bottom now, so the impact of the rate hike is not that significant. Additionally, a 50 basis point hike leaves room for rate cuts next year, and if inflation data declines by year-end, it can fuel expectations for rate cuts next year. C: No hike in July, and if inflation data declines by September, continue no hikes, relying solely on hawkish talk to suppress inflation. This seems good but is very risky and can easily backfire. The market would remain in fear of the 'boot not dropping,' as happened once with Powell in 2021. I think this scenario is unlikely. If I were Warsh, I would choose scenario B.
sunlc.ai
sunlc.ai
Thanks to OKX Planet for the invitation. Tomorrow night, I will chat with @Mercy_okx about some of my views on the US stock AI sector. Recently, the US stock market has undergone a deep correction, with various negative news coming one after another. The Federal Reserve is also about to raise interest rates. Will the market rebound from the bottom or enter a full bear market? I will share my perspective based on my research on the AI industry and macro fundamentals, and deeply analyze the underlying logic behind my previous accurate prediction of a short-term peak in storage, hoping to provide some reference for everyone's investment decisions. Everyone is welcome to bring questions to the OKX live broadcast room.
Mercy_okx
Mercy_okx
Why do people who are bullish on AI long-term hesitate to chase Hynix? Many tend to equate two things: Bullish on AI = Bullish on storage Bullish on storage = Chasing the leader But Sun @sunlc_crypto's judgment is more like "finding bugs"— He is bullish on AI and storage demand long-term, yet believes that if Hynix lists on the US stock market, it may not continue to rise after listing and might even drop first. Has the market already priced in optimistic expectations, or will US semiconductor policies, export restrictions to China, and supply chain localization really change its future revenue, profits, and valuation? In this live stream, we will also discuss: ▪️ How to use AI to select US stocks; ▪️ Whether the storage cycle is really nearing its peak; ▪️ Where to find true "affordable alternatives" after the leader becomes too expensive; ▪️ Which signals from upcoming earnings reports and Federal Reserve meetings are most worth watching? Being bullish on an industry doesn't mean every price is worth buying. See you in the Planet live room at 9:30 PM on July 29, don't miss it 👋
sunlc.ai
sunlc.ai
Teaching someone to fish is better than giving them fish. I am preparing to share the complete development approach for an investment terminal system covering the crypto space and US stocks, which I built over 3 months. The system includes more than a dozen modules such as various macro indicators, crypto indicators, event news, crypto arbitrage, US stock AI radar, Twitter news aggregation, US stock daily reports, AI research report library, funding rate arbitrage, crypto and US stock options dashboards, meme coin dashboard, US Treasury/USD/inflation dashboards, all built from scratch using codex+claude. This is a practical decision-making system integrating my 10 years of crypto experience and US stock analysis, not some demo system from AI hype-chasing influencers online. Like and share until we reach 1000, then I will start updating, releasing one module per day.