Core Logic Tests: - Conservative long position: 6.7x leverage with safe liquidation - Aggressive short position: 6.3x leverage with proper buffer - Tight stop loss (2%): 8.5x leverage while maintaining safety - Balance strategies: 100% for <k, 50% for >k accounts - 10% safety buffer maintained between liquidation and stop loss - Smart leverage calculation prevents dangerous liquidation prices - Account-based strategy correctly implemented - Risk assessment logic working as designed - test-ai-leverage-simple.js: Core calculation algorithms - Liquidation price calculations for long/short positions - Safety buffer validation across different scenarios - Balance strategy verification for various account sizes All tests passing - AI leverage system ready for production use!
3.2 KiB
3.2 KiB