# DeepStock: An AI Stock Prediction System Running Purely in the Browser

> DeepStock is a stock prediction system powered by a neural network with only 410,000 parameters, running securely in the browser. It requires no server or API key, all computations are done locally, and it supports predictions across 6 time horizons.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-01T22:10:48.000Z
- 最近活动: 2026-06-01T22:19:52.899Z
- 热度: 150.8
- 关键词: 边缘AI, 股票预测, 神经网络, 浏览器端机器学习, 模型压缩, 隐私保护, 金融AI, JavaScript
- 页面链接: https://www.zingnex.cn/en/forum/thread/deepstock-ai
- Canonical: https://www.zingnex.cn/forum/thread/deepstock-ai
- Markdown 来源: floors_fallback

---

## DeepStock: An AI Stock Prediction System Running Purely in the Browser (Introduction)

Key Takeaways: DeepStock v7 is a neural network system with only 411K parameters, running entirely in the browser. It requires no server or API key, all computations are done locally, and it supports stock predictions across 6 time horizons from 1 day to 1 year. Privacy protection is its core advantage. The project was developed by WheatleyCoder, open-sourced on GitHub, and released on June 1, 2026.

## Project Background and Philosophy

The most distinctive feature of DeepStock is its privacy-first design. Most AI financial tools rely on cloud computing, which may lead to user data being collected; however, DeepStock runs in the browser and uses pure JS for inference, so user data never leaves the local device. Project Overview: Supports predictions across 6 time horizons, with a small but fully functional model. Original Author/Maintainer: WheatleyCoder, Source Platform: GitHub, Original Link: https://github.com/WheatleyCoder/deepstock.

## Technical Architecture and Feature Engineering

**Technical Architecture**: Input layer processes 148-dimensional features (LayerNorm normalization) → Conditional embedding (FiLM technique injects time horizon and industry classification) → Core component: feature-grouped self-attention (4 groups to reduce complexity) → 4 gated residual blocks → 6 multi-scale prediction heads (corresponding to different time horizons) → Output layer (direction prediction, return magnitude, confidence).

**Feature Engineering**: The 148-dimensional indicators are divided into 5 categories: Momentum (RSI, MACD, etc.), Volatility (ATR, etc.), Volume (OBV, etc.), Fundamentals (P/E ratio, etc.), and Macro (interest rates, etc.). Data is obtained from the Yahoo Finance API (accessed via CORS proxy).

## Training Data and Model Performance

**Training Data**: Covers 690 stocks, 500,000 samples from 10 years of historical data.

**Performance**: Short-term (1 day) direction accuracy: 55.8%, long-term (1 year) up to 62.2%, comprehensive score: 0.5742 (38th epoch).

**Training Techniques**: Focal Loss to address class imbalance; asymmetric threshold setting for a wider sell interval; multi-scale bottleneck heads to allocate more expressive power to long-term predictions. The developer explicitly labels it as an experimental model for educational purposes.

## Technical Challenges in Browser-side Implementation

Key Challenges and Solutions: 1. **Model Compression**: Float16 quantization, weights compressed to ~1.2MB, stored in base64 to reduce transmission size; 2. **Pure JS Implementation**: No dependency on frameworks like TensorFlow.js, all operators (LayerNorm, FiLM, grouped attention, etc.) implemented from scratch; 3. **Performance Optimization**: Potential use of Web Workers to move inference to background threads, maintaining UI responsiveness; 4. **Numerical Stability**: Ensure consistency between JS double-precision floats and PyTorch single-precision floats.

## Limitations and Usage Recommendations

**Limitations**: 1. Limited to historical data patterns (non-stationary markets, black swan events may render it ineffective); 2. Limited accuracy (62.2% for 1-year predictions still has nearly 40% error rate, cannot be relied on alone); 3. Data delay (free Yahoo Finance data has delays); 4. No risk management (no position management, stop-loss, etc.).

**Usage Recommendations**: Only use as an educational experimental tool to assist thinking; do not replace professional investment advice.

## Project Significance and Summary

**Project Significance**: Demonstrates a new paradigm for edge AI (model compressed to run on edge devices, eliminating cloud dependency), with natural advantages in privacy-sensitive scenarios (finance, healthcare); provides a learning case for machine learning engineers (architecture design under resource constraints, engineering deployment).

**Summary**: DeepStock is an open-source project with exquisite technology and advanced philosophy, reflecting a responsible development attitude (frankly disclosing limitations). It is a learning resource for developers and an interesting experimental tool for ordinary users.
