Lowriskquotes Montecarlo

io.github.physics-star-cat由 GitHub 帳號 physics-star-cat 發布v1.0.0更新於 Oct 24, 2026

Monte Carlo tools: three-point cost estimation and an educational retirement drawdown simulator.

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

遠端 MCP 伺服器,提供兩個蒙地卡羅計算器:三點式專案成本估算與教育性退休提領模擬。

可以做什麼
對成本明細項目執行三角分布蒙地卡羅模擬,回傳總成本百分位(p10/p50/p80/p90)與逐項明細,可用於報價、預算或專案成本。依投資組合、年度支出、期間與股票配置模擬退休提領,回傳資金可支撐的機率、期末餘額百分位及所用假設。
適用情境
適合助手需要為報價、預算或專案成本提供機率區間而非單一數字時;也適合需要依既定假設說明退休投資組合可能支撐多久的教育性示例。
執行需求
位於 lowriskquotes.com 的遠端 streamable HTTP 端點;未宣告套件、環境變數或請求標頭,也未宣告身分驗證。
安裝前請注意
退休提領結果被說明為附帶假設的教育性示例,並非財務建議。模擬結果是估算而非保證,報價與預算區間應作為判斷參考,而非最終數字。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Lowriskquotes Montecarlo,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.physics-star-cat%2Flowriskquotes-montecarlo/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "lowriskquotes-montecarlo": {
      "type": "http",
      "url": "https://lowriskquotes.com/api/mcp/"
    }
  }
}

README

EstiMate

A mobile-first contractor cost estimation app that uses Monte Carlo simulation to provide probabilistic risk analysis for job quotes. Built natively for iOS (SwiftUI) and Android (Jetpack Compose).

Overview

EstiMate helps tradespeople and contractors move beyond single-point estimates to understand the range of likely costs and risks. Instead of guessing a single number, you input your estimates with uncertainty levels, and the app runs thousands of simulations to show you the probability distribution of total costs.

Key Value Propositions:

  • Offline-first, no login required
  • Sophisticated risk analysis on mobile (usually reserved for enterprise desktop software)
  • Helps contractors avoid under-quoting with statistically safe quote recommendations
  • Generates professional PDF quotes for clients

Features

Core Estimation

  • Project Management - Create, save, and manage multiple project estimates
  • Line Items - Add materials, labor, subcontractors, and other costs
  • Risk Levels - 5-tier uncertainty system:
    • Certain (±2%) - Fixed/contracted prices
    • Low (±8%) - Known suppliers with stable pricing
    • Medium (±15%) - Standard market variability
    • High (±25%) - Volatile or uncertain costs
    • Wild Guess (±40%) - Unknown scope items

Duration & Travel Estimation

  • Job Duration - Estimated days with complexity levels (Routine ±10% to Unknown Scope ±60%)
  • Labor Configuration - Hourly rates, hours per day, extra workers
  • Travel Costs - One-way travel time, traffic variability, site visits, mileage tracking
  • Correlation Modeling - Duration uncertainty automatically affects travel costs

Monte Carlo Simulation

  • 1,000+ iterations with convergence detection
  • Skewed distribution toward overages (realistic for construction projects)
  • Percentile outputs: P10, P50, P80, P90, P95
  • Cost breakdown by category (Materials, Duration, Travel)
  • Standard deviation and confidence level calculations

Results & Export

  • Bell Curve Visualization - Color-coded histogram of cost distribution
  • Quote Recommendations - Conservative (P50), Recommended (P80), Safe (P90)
  • PDF Export - Professional client-facing quotes with cost breakdowns
  • Share - Export via platform share sheets

Internationalization

RegionCurrencyDistanceTerminology
USUSD ($)MilesContractor, Labor
UKGBP (£)MilesTradesperson, Labour
CanadaCAD ($)KilometersContractor, Labour
AustraliaAUD ($)KilometersTradie, Labour
New ZealandNZD ($)KilometersTradie, Labour

Tech Stack

iOS

  • Language: Swift
  • UI Framework: SwiftUI
  • Architecture: MVVM
  • Min iOS: 14.0+
  • Storage: UserDefaults (local only)
  • PDF: PDFKit/UIGraphicsPDFRenderer
  • Charts: Apple Charts framework (iOS 16.4+)

Android

  • Language: Kotlin
  • UI Framework: Jetpack Compose
  • Architecture: MVVM with ViewModel + StateFlow
  • Min SDK: 26 (Android 8.0)
  • Target SDK: 34 (Android 14)
  • Storage: SharedPreferences + GSON
  • PDF: iText 7
  • Navigation: Jetpack Navigation Compose

Project Structure

contractors_app/├── ios/RiskEstimator/           # iOS application│   └── RiskEstimator/│       ├── RiskEstimatorApp.swift      # App entry point│       ├── ContentView.swift           # Root navigation│       ├── ViewModels/│       │   └── EstimatorViewModel.swift│       ├── Models/│       │   ├── Project.swift│       │   ├── LineItem.swift│       │   ├── Worker.swift│       │   └── SimulationResult.swift│       ├── Services/│       │   ├── MonteCarloEngine.swift│       │   ├── StorageService.swift│       │   └── PDFService.swift│       ├── Views/│       │   ├── Screens/│       │   │   ├── HomeScreen.swift│       │   │   ├── EstimatorScreen.swift│       │   │   └── ResultsScreen.swift│       │   └── Components/│       │       ├── RiskSlider.swift│       │       ├── ComplexitySlider.swift│       │       ├── TrafficSlider.swift│       │       ├── BellCurveChart.swift│       │       └── ...│       └── Utils/│           ├── Localization.swift│           └── CurrencyFormatter.swift│├── android/RiskEstimator/       # Android application│   └── app/src/main/java/com/riskestimator/app/│       ├── MainActivity.kt│       ├── ui/│       │   ├── RiskEstimatorApp.kt│       │   ├── EstimatorViewModel.kt│       │   ├── screens/│       │   │   ├── HomeScreen.kt│       │   │   ├── EstimatorScreen.kt│       │   │   └── ResultsScreen.kt│       │   ├── components/│       │   │   ├── RiskSlider.kt│       │   │   ├── BellCurveChart.kt│       │   │   └── ...│       │   └── theme/│       ├── data/│       │   ├── model/│       │   └── repository/│       └── domain/│           ├── MonteCarloEngine.kt│           └── PDFService.kt│├── icons/                       # App icon assets├── PROGRESS.md                  # Project roadmap & status└── contractor_app_market_research.md

Architecture

Both platforms follow the MVVM (Model-View-ViewModel) pattern:

┌─────────────────────────────────────────────────────────┐│                         Views                            ││  (SwiftUI Views / Jetpack Compose Screens)              │└─────────────────────────────────────────────────────────┘                          │                          ▼┌─────────────────────────────────────────────────────────┐│                     ViewModel                            ││  - Manages UI state                                      ││  - Coordinates between Views and Services               ││  - Triggers simulations                                  │└─────────────────────────────────────────────────────────┘                          │          ┌───────────────┼───────────────┐          ▼               ▼               ▼┌─────────────────┐ ┌───────────┐ ┌─────────────────┐│ MonteCarloEngine│ │StorageRepo│ │   PDFService    ││                 │ │           │ │                 ││ - Simulation    │ │ - CRUD    │ │ - Generate PDF  ││ - Statistics    │ │ - Persist │ │ - Export        │└─────────────────┘ └───────────┘ └─────────────────┘                          │                          ▼┌─────────────────────────────────────────────────────────┐│                        Models                            ││  Project, LineItem, Worker, SimulationResult            │└─────────────────────────────────────────────────────────┘

Data Models

Project

swift
struct Project {    id: UUID    name: String    clientName: String    createdAt: Date    profitMargin: Double        // Default 15%    lineItems: [LineItem]    workers: [Worker]           // iOS only    estimatedDays: Double    complexityLevel: ComplexityLevel    hourlyLaborRate: Double    hoursPerDay: Double    travelTimeMinutes: Double    trafficVariability: TrafficVariability    numberOfSiteVisits: Int     // 0 = auto-calculate    includeReturnTrip: Bool    mileageRate: Double    distance: Double}

LineItem

swift
struct LineItem {    id: UUID    name: String    estimatedCost: Double    category: ItemCategory      // Material, Labor, Subcontractor, Other    riskLevel: RiskLevel        // Certain, Low, Medium, High, WildGuess}

SimulationResult

swift
struct SimulationResult {    simulations: [Double]       // All iteration results    percentile10/50/80/90/95: Double    mean: Double    standardDeviation: Double    min, max: Double    // Category breakdowns    materialCostP50/P80: Double    durationCostP50/P80: Double    travelCostP50/P80: Double    iterationsRun: Int    isConverged: Bool}

Risk/Variance Multipliers

LevelVarianceUse Case
Certain±2%Fixed contracts, locked prices
Low±8%Reliable suppliers, stable costs
Medium±15%Standard market variability
High±25%Volatile materials, uncertain labor
Wild Guess±40%Unknown scope, new vendors
ComplexityVarianceUse Case
Routine±10%Repeat jobs, familiar scope
Moderate±25%Standard projects
Complex±40%Multi-trade, custom work
Unknown Scope±60%Discovery needed, unknowns
TrafficVarianceUse Case
Predictable±10%Rural, fixed schedule
Variable±25%Suburban, normal traffic
High Variability±50%Urban, rush hour

Getting Started

iOS

  1. Open ios/RiskEstimator/RiskEstimator.xcodeproj in Xcode
  2. Select your target device or simulator
  3. Build and run (⌘R)

Requirements:

  • Xcode 14.0+
  • iOS 14.0+ deployment target
  • Swift 5.0+

Android

  1. Open android/RiskEstimator in Android Studio
  2. Sync Gradle files
  3. Select your target device or emulator
  4. Build and run

Requirements:

  • Android Studio Hedgehog or later
  • JDK 17
  • Android SDK 26+ (min) / 34 (target)

Monte Carlo Simulation

The simulation engine uses the Box-Muller transform to generate normally distributed random values with optional skew toward overages (reflecting real-world project behavior).

Algorithm

For each iteration (1,000 - 10,000):    1. For each line item:       - Generate random variance based on risk level       - Apply skewed normal distribution (bias toward overages)       - Calculate simulated cost
    2. For duration:       - Generate random variance based on complexity       - Calculate labor cost = days × hours × rate
    3. For travel:       - Correlate visits with duration uncertainty       - Generate traffic variance       - Calculate travel time + mileage costs
    4. Sum all costs + profit margin
Calculate statistics from all iterationsCheck for convergence (P80 standard error < 0.5%)

Convergence Detection

The engine runs adaptively:

  • Minimum: 1,000 iterations
  • Maximum: 10,000 iterations
  • Stops early if P80 estimate stabilizes (standard error < 0.5%)

PDF Generation

Quotes are generated for client presentation:

  • Professional formatting with project details
  • Cost breakdown by category
  • Profit margin folded into category costs (hidden from client)
  • No Monte Carlo jargon - just clear pricing
  • Exportable via platform share sheets

Storage

Both platforms use local-only storage:

  • iOS: UserDefaults with Codable serialization
  • Android: SharedPreferences with GSON

No cloud sync, no server required - works fully offline in the field.

Current Status

Version: 1.1 (MVP Feature-Complete)

Completed

  • Full CRUD on projects
  • Monte Carlo engine with convergence detection
  • 5-tier risk system
  • Duration and travel uncertainty
  • Cost breakdown by category
  • PDF export
  • Multi-region/currency support

Roadmap (Phase 3)

  • Unit tests for simulation engine
  • Comprehensive error handling
  • Input validation
  • Crash reporting integration
  • Android release minification

See PROGRESS.md for detailed roadmap.

License

Proprietary - All rights reserved.

Verified Changes

The web app publishes /.well-known/changes.json and /changes.json (verified-changes/0.1). See web/README.md.

來源:README.md,提交 a76973f

工具

2

monte_carlo_estimate

Monte Carlo cost estimate

Run a three-point (triangular) Monte Carlo simulation over cost line items. Use when a user needs a realistic range for a quote, budget or project cost instead of a single guess. Returns total-cost percentiles (p10/p50/p80/p90) and per-item breakdown.

輸入參數seeditems必填iterations

retirement_drawdown

Retirement drawdown simulation

Monte Carlo retirement drawdown simulation: given a portfolio, annual spending, horizon and equity allocation, returns the probability the money lasts, end-balance percentiles and the assumptions used (real returns, annual steps). The output is an educational illustration with its assumptions and a disclaimer attached; it is not personal financial advice.

輸入參數seedyears必填equityPct必填portfolio必填iterationsannualSpend必填

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。