Expand model tag support: add GLM-5.1, simplify Anthropic IDs, scan tags anywhere in message
- Flink update_bars debouncing - update_bars subscription idempotency bugfix - Price decimal correction bugfix of previous commit - Add GLM-5.1 model tag alongside renamed GLM-5 - Use short Anthropic model IDs (sonnet/haiku/opus) instead of full version strings - Allow @tags anywhere in message content, not just at start - Return hasOtherContent flag instead of trimmed rest string - Only trigger greeting stream when tag has no other content - Update workspace knowledge base references to platform/workspace and platform/shapes - Hierarchical knowledge base catalog - 151 Trading Strategies knowledge base articles - Shapes knowledge base article - MutateShapes tool instead of workspace patch
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
---
|
||||
description: "A portfolio strategy that optimally determines how much cash to hold to meet unforeseen liquidity demands while minimizing the drag from uninvested capital."
|
||||
tags: [cash, liquidity, risk-management]
|
||||
---
|
||||
|
||||
# Liquidity Management
|
||||
|
||||
**Section**: 17.3 | **Asset Class**: Cash | **Type**: Risk management / Portfolio construction
|
||||
|
||||
## Overview
|
||||
|
||||
From a portfolio management perspective, this strategy amounts to optimally defining the amount of cash to be held in the portfolio to meet liquidity demands generated by unforeseen events. Cash provides immediate liquidity, whereas other assets would have to be liquidated first, which can be associated with substantial transaction costs — especially if liquidation is abrupt. From a corporate perspective, holding cash can be a precautionary measure aimed at avoiding cash flow shortfalls that can yield, inter alia, loss of investment opportunities, financial distress, etc.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
The strategy involves three distinct roles for cash as an asset:
|
||||
|
||||
1. **Risk management tool** — Cash held as a buffer mitigates drawdowns and volatility by providing a shock absorber when other assets decline or become illiquid.
|
||||
|
||||
2. **Opportunity management tool** — A cash reserve allows the investor to take advantage of specific or unusual situations (e.g., distressed asset purchases, sudden dislocations) without needing to liquidate existing positions.
|
||||
|
||||
3. **Liquidity management tool** — In unexpected situations requiring liquid funds, cash is the only immediately available resource without liquidation costs.
|
||||
|
||||
Liquid cash equivalents that can be held in a portfolio include:
|
||||
- U.S. Treasury bills
|
||||
- Bank deposit certificates (CDs)
|
||||
- Commercial paper
|
||||
- Banker's acceptances
|
||||
- Eurodollars
|
||||
- Repurchase agreements (repos)
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The direct return on cash is low (near the risk-free rate). The strategy's value lies in its option-like properties: the ability to act quickly when opportunities arise and to avoid forced liquidation at disadvantageous prices. The optimal cash level trades off the opportunity cost of holding cash against the cost of unexpected forced liquidation.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Liquidity buffer target**: sized to expected maximum drawdown of cash needs over some horizon
|
||||
- **Opportunity reserve**: discretionary allocation kept available for tactical deployment
|
||||
- **Kelly-based sizing**: related to Kelly criterion strategies; the cash fraction can be derived from portfolio growth optimization
|
||||
- **Liquidation cost model**: transaction costs and market impact of rapidly liquidating other assets inform the minimum required cash buffer
|
||||
|
||||
## Variations
|
||||
|
||||
- **Corporate treasury liquidity management**: focused on operating cash flow needs, payroll, and debt service
|
||||
- **Hedge fund liquidity management**: sized to potential investor redemptions and margin call scenarios
|
||||
- **Tactical cash allocation**: dynamically increasing cash weight as a defensive signal during high-volatility regimes
|
||||
|
||||
## Notes
|
||||
|
||||
The optimal cash holding is not the same as the rationale behind Kelly strategies. The appropriate cash level depends on the investor's specific liability structure, redemption profile, and the liquidity of the remaining portfolio. Holding too little cash forces costly liquidation; holding too much creates unacceptable opportunity cost drag. The strategy is foundational to virtually all portfolio management frameworks.
|
||||
49
gateway/knowledge/trading/strategies/cash/loan-sharking.md
Normal file
49
gateway/knowledge/trading/strategies/cash/loan-sharking.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "An illegal lending practice involving loans at excessively high interest rates without collateral, enforced through coercion; documented here for educational and awareness purposes only."
|
||||
tags: [cash, illegal, lending, awareness]
|
||||
---
|
||||
|
||||
# Loan Sharking
|
||||
|
||||
**Section**: 17.6 | **Asset Class**: Cash | **Type**: Illegal activity (documented for educational/awareness purposes only)
|
||||
|
||||
## Overview
|
||||
|
||||
Loan sharking consists of offering loans at excessively high — often usurious — interest rates. Unlike pawnbroking, loan sharking in many jurisdictions is illegal, and the loan is not necessarily secured by collateral. This activity is documented here solely for educational and awareness purposes. It is not a legitimate trading strategy and constitutes criminal conduct in most jurisdictions.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
**Loan structure:**
|
||||
- Cash is lent to a borrower at interest rates far above legal usury limits — rates can be expressed in weekly or daily terms (e.g., "2 for 1" means repay double within a fixed period)
|
||||
- No formal legal documentation is typically used; the arrangement is informal and unenforceable through normal legal channels
|
||||
- The loan is typically unsecured — there is no collateral pledge
|
||||
|
||||
**Enforcement:**
|
||||
- Because the loan cannot be enforced through the legal system, the lender (loan shark) may resort to extralegal means of enforcement
|
||||
- This can include blackmail, threats, and physical violence to compel repayment
|
||||
- The borrower has no legal recourse against abusive enforcement methods
|
||||
|
||||
**Relationship to legitimate lending:**
|
||||
- Loan sharks operate in the same economic niche as payday lenders and pawnbrokers but without legal constraints on rates or enforcement methods
|
||||
- They typically serve borrowers with no access to formal credit (e.g., due to criminal records, immigration status, or existing debt)
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The stated "return" is the extremely high interest charged. In practice, the loan shark often profits more from the coercive control over the borrower than from pure interest income — borrowers may be exploited for labor or other services. The high nominal returns are offset by significant legal, personal safety, and operational risks.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Interest rate**: typically far above legal usury limits; often quoted in short-period terms to obscure the true APR
|
||||
- **Enforcement mechanism**: the primary differentiator from legal lending; ranges from social pressure to physical violence
|
||||
- **Borrower desperation**: loan sharks target individuals with no alternative credit access
|
||||
- **Rollover/compound traps**: unpaid interest may compound rapidly, trapping borrowers in escalating debt
|
||||
|
||||
## Variations
|
||||
|
||||
- **Organized crime lending**: loan sharking as a service offered by criminal organizations, often linked to other illegal activities
|
||||
- **Predatory lending (grey area)**: legal but extremely high-rate lenders (payday loans, rent-to-own) operating at the edge of legality
|
||||
- **Salary lending / advance-fee lending**: informal arrangements common in some developing markets
|
||||
|
||||
## Notes
|
||||
|
||||
Loan sharking is **illegal** in most jurisdictions. It is documented here exclusively for educational purposes — to illustrate the spectrum of cash-based financial activities, support awareness of predatory lending, and assist in compliance or regulatory analysis. Any actual participation in loan sharking carries severe criminal penalties including imprisonment. The key distinction from legal high-rate lending (e.g., payday loans) is the use of illegal coercion and the absence of legal licensing and rate-cap compliance.
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
description: "A three-stage process (placement, layering, integration) by which illegal cash is transformed into legitimate-appearing assets; documented here for educational and awareness purposes only."
|
||||
tags: [cash, illegal, awareness]
|
||||
---
|
||||
|
||||
# Money Laundering — The Dark Side of Cash
|
||||
|
||||
**Section**: 17.2 | **Asset Class**: Cash | **Type**: Illegal activity (documented for educational/awareness purposes only)
|
||||
|
||||
## Overview
|
||||
|
||||
Money laundering is an activity wherein cash is used as a vehicle to transform illegal profits into legitimate-appearing assets. It is documented here solely for educational and awareness purposes — this is an illegal activity in virtually all jurisdictions and is not a legitimate trading strategy. Understanding its mechanics is relevant for compliance, AML (anti-money-laundering) system design, and regulatory awareness.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
There are three main steps in a money laundering process:
|
||||
|
||||
1. **Placement** — The first and riskiest step. Illegal funds are introduced into the legal economy via fraudulent means, e.g., by dividing funds into small amounts and depositing them into multiple bank accounts (structuring/smurfing) to avoid detection thresholds.
|
||||
|
||||
2. **Layering** — Moving the money around between different accounts and even countries, thereby creating complexity and separating the money from its source by several degrees. The goal is to obscure the audit trail.
|
||||
|
||||
3. **Integration** — Money launderers recover the funds via legitimate-looking sources, e.g., cash-intensive businesses such as bars, restaurants, car washes, hotels (in some countries), gambling establishments, and parking garages.
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The "return" is the successful conversion of illicit proceeds into spendable, untraceable wealth. The primary risk is detection and prosecution at the placement stage, which is why smurfing and structuring techniques are employed to stay below reporting thresholds.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Placement risk**: highest at initial deposit stage; mitigated by structuring below reporting thresholds
|
||||
- **Layering complexity**: number of intermediary accounts, jurisdictions, and transactions used to obscure origin
|
||||
- **Integration vehicles**: choice of business type affects detectability (high-cash-volume businesses preferred)
|
||||
|
||||
## Variations
|
||||
|
||||
- **Trade-based laundering**: over- or under-invoicing international trade transactions
|
||||
- **Real estate laundering**: purchasing and reselling property through shell companies
|
||||
- **Cryptocurrency layering**: use of mixers, privacy coins, and cross-chain swaps to layer funds
|
||||
|
||||
## Notes
|
||||
|
||||
This strategy is **illegal** in all major jurisdictions. It is documented here exclusively for educational purposes, AML awareness, and to support the design of detection and compliance systems. Financial institutions are required by law (e.g., BSA/AML regulations, FATF guidelines) to implement controls to detect and report suspicious activity consistent with these patterns.
|
||||
51
gateway/knowledge/trading/strategies/cash/pawnbroking.md
Normal file
51
gateway/knowledge/trading/strategies/cash/pawnbroking.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
description: "A secured short-term lending strategy where a pawnbroker extends a cash loan against physical collateral, retaining the right to sell the collateral if the loan is not repaid."
|
||||
tags: [cash, lending, collateral, alternative]
|
||||
---
|
||||
|
||||
# Pawnbroking
|
||||
|
||||
**Section**: 17.5 | **Asset Class**: Cash | **Type**: Collateralized lending
|
||||
|
||||
## Overview
|
||||
|
||||
Pawnbroking is conceptually similar to repurchase agreements (REPOs) but operates in retail/consumer markets and has ancient historical roots. A pawnbroker extends a secured cash loan with a pre-agreed interest rate and period (which can sometimes be extended). The loan is secured with a collateral item of value; if the loan is not repaid with interest as agreed, the collateral is forfeited by the borrower and the pawnbroker can keep it or sell it.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
**Loan origination:**
|
||||
- Borrower presents a physical item of value as collateral (jewelry, electronics, vehicles, rare books, musical instruments, etc.)
|
||||
- Pawnbroker appraises the item and offers a loan amount at a significant discount to appraised value (e.g., 25–60% of estimated resale value)
|
||||
- Borrower receives cash; pawnbroker retains physical possession of the item
|
||||
- A loan ticket is issued specifying the principal, interest rate, fees, and redemption deadline
|
||||
|
||||
**Redemption or forfeiture:**
|
||||
- If borrower repays principal plus interest within the agreed period, the item is returned
|
||||
- If borrower fails to repay, the pawnbroker takes full ownership of the collateral and may sell it to recover the loan amount plus a profit margin
|
||||
|
||||
**From an investment perspective:**
|
||||
- The pawnbroker's strategy profits from: (a) interest income on repaid loans, and (b) resale margin on forfeited collateral
|
||||
- The deep discount on collateral valuation provides a cushion against mispriced or illiquid items
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
Returns come from two sources: interest income on performing loans (typically high, reflecting the high-risk, unbanked borrower profile) and trading profit on forfeited collateral items sold at or above the appraised value. The high interest rates compensate for the non-recourse nature of many pawn loans (the lender's only recourse is the collateral, not the borrower personally).
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Loan-to-value (LTV) ratio**: loan amount as a fraction of collateral's estimated resale value; typically 25–60%
|
||||
- **Interest rate / fees**: high relative to bank rates; regulated in many jurisdictions with rate caps
|
||||
- **Loan term**: typically 1–4 months; extensions often available
|
||||
- **Collateral liquidity**: items with active resale markets (gold jewelry, electronics) command better LTV ratios
|
||||
- **Forfeiture rate**: the fraction of loans that are not redeemed; drives the resale revenue component
|
||||
|
||||
## Variations
|
||||
|
||||
- **Online pawnbroking**: digital platforms for luxury goods, collectibles, and watches
|
||||
- **Commodity pawnbroking**: pawnbrokers dealing specifically in precious metals and gems (overlap with commodity trading)
|
||||
- **Title lending / auto pawn**: loans secured against vehicle titles; borrower retains use of the vehicle while the title is held
|
||||
- **Jewelry/gold dealers**: effectively pawnbrokers who specialize in precious metals with spot-price-linked valuations
|
||||
|
||||
## Notes
|
||||
|
||||
Pawnbroking is legal and regulated in most jurisdictions, with interest rates and practices governed by consumer lending laws. The pawnbroker trades physical commodities such as silver and gold as a byproduct of forfeited collateral. The strategy is highly local and operationally intensive. It is conceptually the retail analogue of institutional repo markets — both involve a cash loan secured by an asset with a right to liquidate the asset upon default.
|
||||
53
gateway/knowledge/trading/strategies/cash/repo.md
Normal file
53
gateway/knowledge/trading/strategies/cash/repo.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
description: "A repurchase agreement strategy that borrows or lends cash at a preset interest rate for 1 day to 6 months using securities as collateral, providing immediate liquidity."
|
||||
tags: [cash, fixed-income, collateral, short-term]
|
||||
---
|
||||
|
||||
# Repurchase Agreement (REPO)
|
||||
|
||||
**Section**: 17.4 | **Asset Class**: Cash | **Type**: Collateralized lending / Cash equivalent
|
||||
|
||||
## Overview
|
||||
|
||||
A repurchase agreement (REPO) is a cash-equivalent asset that provides immediate liquidity at a preset interest rate for a specific period of time in exchange for another asset used as collateral. A REPO strategy amounts to borrowing (or lending) cash with interest in exchange for securities, with the commitment of repurchasing them from (or reselling them to) the counterparty at the end of the term. This type of transaction typically spans from 1 day to 6 months.
|
||||
|
||||
## Construction / Mechanics
|
||||
|
||||
**From the borrower's perspective (classic repo):**
|
||||
- The borrower sells securities to the lender at a spot price
|
||||
- Simultaneously agrees to repurchase those securities at a future date at a higher price
|
||||
- The difference in prices represents the repo interest (the "repo rate")
|
||||
- The securities serve as collateral; the lender has recourse to them if the borrower defaults
|
||||
|
||||
**From the lender's perspective (reverse repo):**
|
||||
- The lender buys securities and simultaneously agrees to resell them at a later date
|
||||
- Effectively a collateralized cash loan earning the repo rate
|
||||
- Counterparty credit risk is mitigated by holding the collateral
|
||||
|
||||
**Mechanics summary:**
|
||||
- Term: overnight (O/N) to 6 months; "open" repos have no fixed term
|
||||
- Collateral: typically government securities, though agency bonds and other high-grade paper are used
|
||||
- Haircut: the collateral is valued at a discount to market price to provide a buffer against collateral price declines
|
||||
|
||||
## Return Profile / Objective
|
||||
|
||||
The strategy earns (or pays) the repo rate, which is typically close to but slightly below the risk-free rate (for general collateral) or can be significantly below (even negative) for "special" securities in high demand. The primary objective is efficient short-term cash management — deploying idle cash at near-risk-free rates while maintaining near-immediate liquidity.
|
||||
|
||||
## Key Parameters / Signals
|
||||
|
||||
- **Repo rate**: the annualized interest rate on the transaction; general collateral (GC) rate vs. specific/special rates
|
||||
- **Haircut**: discount applied to collateral value (e.g., 2% for Treasuries, higher for lower-grade collateral)
|
||||
- **Term**: overnight, term (fixed date), or open
|
||||
- **Collateral type**: determines applicable haircut and rate; GC repos use any acceptable security vs. specific repos tied to a named security
|
||||
- **Margin calls**: triggered if collateral value falls below the required threshold during the term
|
||||
|
||||
## Variations
|
||||
|
||||
- **Reverse repo**: the lender's side; used by central banks as a monetary policy tool and by money market funds as an investment
|
||||
- **Tri-party repo**: a clearing bank acts as intermediary, handling collateral management for both parties
|
||||
- **Securities lending**: conceptually similar; the security owner lends it out for a fee, receiving cash or other securities as collateral
|
||||
- **GC pooling**: centralized clearing of general collateral repos to improve netting and efficiency
|
||||
|
||||
## Notes
|
||||
|
||||
REPOs are a foundational instrument in money markets and are used by banks, broker-dealers, money market funds, and central banks. The 2008 financial crisis revealed the fragility of repo markets when collateral quality deteriorated rapidly (the "run on repo"). Counterparty credit risk, collateral quality, and the potential for "fire-sale" dynamics during stress are the primary risk considerations. REPOs are conceptually similar to pawnbroking but operate in institutional markets at vastly larger scale.
|
||||
Reference in New Issue
Block a user