Serendipity2-0 / TradeManV1

0 stars 0 forks source link

Mission Touchless DB #38

Closed amolkittur closed 1 month ago

amolkittur commented 1 month ago

Description

This issue outlines critical tasks for refactoring our database management system and implementing key business logic algorithms in our application. These tasks encompass database cleanup, API enhancements for a touchless database interaction, and the development of capital allocation and strategy selection algorithms.

Tasks

amolkittur commented 1 month ago

I have modified the JSON with margin allocation. If any changes are to be made let me know @omkarh25

{
  "Tr00": {
    "Accounts": {
      "Equity": {
        "CapitalAllocation": 100,
        "11Jul24_Equity_FreeCash": 141558.6,
        "11Jul24_Equity_Holdings": 81028
      },
      "01Jul24_Portfolio_AccountValue": 141559,
      "01Jul24_Portfolio_FreeCash": 141558.6,
      "01Jul24_Portfolio_Holdings": 81028,
      "02Jul24_Portfolio_FreeCash": 141507.7,
      "02Jul24_Portfolio_AccountValue": 141507.7,
      "02Jul24_Portfolio_Holdings": 81028
    },
    "Active": true,
    "Broker": {
      "ApiKey": "asdasd",
      "ApiSecret": "asd",
      "BrokerName": "Zerodha",
      "BrokerPassword": "K@asdf",
      "BrokerUsername": "asdf",
      "SessionId": "asdf",
      "TotpAccess": "dgh"
    },
    "Profile": {
      "AadharCardNo": "234",
      "AccountStartDate": "03Jul23",
      "BankAccountNo": "234",
      "BankName": "State Bank of India",
      "DOB": "25Apr90",
      "Email": "nightysky123123asdkk@gmail.com",
      "GmailPassword": "a",
      "Name": "Omkar Hegde",
      "PANCardNo": "asddfasdf",
      "PhoneNumber": "+asdfsadf",
      "RiskProfile": {
        "AreaOfInvestment": [
          "Debt",
          "Equity",
          "Derivatives"
        ],
        "Commission": "50-50",
        "DrawdownTolerance": "35",
        "Duration": "12 months",
        "WithdrawalFrequency": "OnRequest"
      },
      "pwd": "a",
      "usr": "0"
    },
    "Strategies": {
      "Equity": {
        "MidTerm": {
          "AllocationPercent": 50,
          "Strategy1": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy1"
          },
          "Strategy2": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy2"
          },
          "Strategy3": {
            "AllocationPercent": 33.33,
            "Qty": 28,
            "RiskPerTrade": 1,
            "StrategyName": "Midterm_Strategy3"
          }
        }
      }
    },
    "Tr_No": "Tr00"
  }
}