Skip to content

GroupLang/market-neutral-provider

Repository files navigation

Market router: Market Neutral Provider

License: MIT Website Twitter

Overview

This system acts as a counterpart to the Market Neutral Requester, focusing on analyzing sector-specific news to generate actionable insights for stock decisions. It utilizes the Market router API for all interactions and integrates with an OpenAI completions endpoint to process news inputs supplied by the requester, subsequently generating investment recommendations.

MarketNeutral (10)

Installation

  1. Clone the repository

    git clone https://github.com/GroupLang/market-neutral-provider.git
    cd market-neutral-provider
  2. Install required libraries

    python3.11 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Set up environment space

    • Set up environment variables

      Copy the sample environment file and configure it as per your requirements.

      [ ! -f .env ] && cp .env.template .env

Configuration

  • Market router:

    • Username, Fullname, Email, Password: These credentials are used for authentication and identification in the market router. If the user is already registered, these parameters are not necessary; instead, add the Market router API key to the .env file as MARKET_ROUTER_API_KEY
    • Deposit Amount: Specify the initial deposit amount for transactions in the market router if needed.
  • Proposal:

    • Endpoint: Define the API endpoint for proposal submissions. Used by market router when requester calls completions endpoint in order to obtain OpenAI wrapper response.
    • Max Bid: Determines the maximum bid amount for proposals. If set to None, a gpt-4o-mini model will decide the appropriate bid based on the instance's background. This part of the configuration directly impacts the economic considerations of the proposals.

These configuration variables are stored in the config file, ensuring the Market Neutral Provider can effectively interact with the Market router by managing its proposals and financial transactions.

Key Components and Processes

Market router Scripts:

  1. Register User Script

    python -m market_router.scripts.register

    This command registers a new user with the Market router API. If MARKET_ROUTER_API_KEY exists (indicating prior registration), this script is unnecessary.

  2. Create API Key Script

    python -m market_router.scripts.api_key

    This command generates a new API key for the user, allowing them to authenticate subsequent requests.

  3. Deposit Script

    python -m market_router.scripts.deposit

    This command facilitates depositing funds into an Market router account, as specified in the deposit_amount configuration.

  4. Create Proposal Script

    python -m market_router.scripts.proposal

    This script submits proposals to the Market router using configured endpoint and max_bid settings, detailing the financial and operational parameters for engagements.

API Services Scripts:

  1. Model Response Script
    python -m api.services.model_response --model_args='{"messages": [{"role": "user", "content": "Test OpenAI Wrapper"}], "model": "gpt-3.5-turbo", "temperature": 0.5}'
    This command generates simulated responses from the model, designed to test the API's capability to process and respond to input accurately under controlled settings.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published