# Utils Library

Common utility functions shared across services in the stock-bot project.

## Included Utilities

### Date Utilities

Helper functions for working with market dates:

```typescript
import { dateUtils } from '@stock-bot/utils';

// Check if a date is a trading day
const isTradingDay = dateUtils.isTradingDay(new Date());

// Get the next trading day
const nextTradingDay = dateUtils.getNextTradingDay(new Date());
```

### Financial Utilities

Mathematical functions for financial calculations:

```typescript
import { calculateCAGR, calculateSharpeRatio } from '@stock-bot/utils';

// Calculate compound annual growth rate
const returns = [0.05, 0.03, -0.01, 0.04, 0.02];
const cagr = calculateCAGR(startValue, endValue, years);

// Calculate Sharpe ratio
const sharpeRatio = calculateSharpeRatio(returns, 0.02);
```
