πŸ“ˆ Automated Research Analysis: Build a Quant Workflow

MindLogic is not only good at processing long text, but also serves as a powerful Structured Data Processing Engine. By using the HTTP plugin to request external APIs and combining it with built-in "Formula Calculations", you can easily build complex financial or business models.

This tutorial will demonstrate how to connect to external crypto or stock APIs, calculate ROI, and have an AI output an investment briefing.

Scenario Overview

We will implement:

  1. Fetch Data: Use the HTTP Request plugin to call public financial APIs for historical prices.
  2. Data Cleaning: Use node scripts to extract specific numerical values from JSON.
  3. Calculate Metrics: Use MindLogic's Math Engine to calculate price changes (ROI).
  4. Generate Briefing: Pass the calculated results to an LLM to generate a report.

Node Orchestration Steps

Step 1: HTTP Data Fetching

Create a node named [Fetch Market Data].

  1. Configure the HTTP Request plugin.
  2. Set the URL to a public market API (e.g., fetching Bitcoin's price for today and yesterday).
  3. Upon execution, the plugin stores the returned JSON string in node.outputs['response'].

Step 2: Parse JSON with Scripts

Create a node named [Data Parser], connected from upstream. In the Script section at the bottom, write:

let rawJson = node.inputs['response'];
if (rawJson) {
    let data = JSON.parse(rawJson);
    // Assuming API returns { "today": 65000, "yesterday": 63000 }
    node.outputs['price_today'] = data.today;
    node.outputs['price_yesterday'] = data.yesterday;
}

Step 3: Math Engine ROI Calculation

Create a node named [Calculate ROI], connected from [Data Parser]. Add a Formula in the Inspector panel:

  • Output Variable: ROI
  • Formula Content: ((Inputs.price_today - Inputs.price_yesterday) / Inputs.price_yesterday) * 100

As data flows through, MindLogic automatically and safely calculates the percentage.

Step 4: AI Intelligent Briefing Generation

Create a node named [AI Analyst], connected from [Calculate ROI].

  1. Select the LLM Plugin.
  2. System Prompt: You are a senior crypto analyst. Please write a one-sentence flash report based on the data provided.
  3. User Prompt: Today's price: {{ node.inputs['price_today'] }}, Yesterday's price: {{ node.inputs['price_yesterday'] }}, ROI: {{ node.inputs['ROI'] }}%.

Advanced Tips

Once this workflow is built, you can save it as a "Macro". Every day, with just one click, it seamlessly executes everything from data fetching and math calculations to copy generation. This demonstrates MindLogic's immense power when handling hybrid tasks (Code Logic + Math + AI Generation).