Presupuesto y Recursos (también “gestión de recursos de seguridad”) es la gestión estratégica de la asignación de recursos financieros, humanos y tecnológicos para la implementación y mantenimiento de programas de seguridad, maximizando el valor y minimizando el riesgo. Esta gestión es fundamental para el gobierno de la seguridad de la información y requiere la alineación de las inversiones en seguridad con los objetivos del negocio y la evaluación del retorno de inversión (ROI) de las iniciativas de seguridad.

¿Qué es la Gestión de Presupuesto y Recursos?

La gestión de presupuesto y recursos en ciberseguridad implica la planificación, asignación y monitoreo de recursos para asegurar que las inversiones en seguridad estén alineadas con los objetivos del negocio y proporcionen el mayor retorno de inversión posible.

Componentes de la Gestión

Presupuesto Financiero

  • Asignación de Presupuesto: Distribución de fondos por categorías
  • ROI de Seguridad: Retorno de inversión en seguridad
  • Costos Operativos: Costos de operación y mantenimiento
  • Inversión en Tecnología: Inversión en herramientas y tecnologías

Recursos Humanos

  • Personal de Seguridad: Equipos de seguridad especializados
  • Capacitación: Inversión en desarrollo de capacidades
  • Consultoría Externa: Servicios de consultoría especializada
  • Outsourcing: Servicios de seguridad externalizados

Recursos Tecnológicos

  • Herramientas de Seguridad: Software y hardware de seguridad
  • Infraestructura: Infraestructura de seguridad
  • Licencias: Licencias de software y servicios
  • Mantenimiento: Costos de mantenimiento y actualización

Sistema de Gestión de Presupuesto

Planificación Presupuestaria

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
import matplotlib.pyplot as plt

class SecurityBudgetManagement:
    def __init__(self):
        self.budget_categories = {
            'personnel': {
                'name': 'Personal de Seguridad',
                'subcategories': ['salaries', 'benefits', 'training', 'recruitment']
            },
            'technology': {
                'name': 'Tecnología de Seguridad',
                'subcategories': ['software', 'hardware', 'licenses', 'maintenance']
            },
            'services': {
                'name': 'Servicios de Seguridad',
                'subcategories': ['consulting', 'outsourcing', 'cloud_services', 'support']
            },
            'infrastructure': {
                'name': 'Infraestructura',
                'subcategories': ['data_center', 'network', 'storage', 'backup']
            },
            'compliance': {
                'name': 'Cumplimiento',
                'subcategories': ['audits', 'certifications', 'legal', 'regulatory']
            }
        }
        
        self.budget_data = {}
        self.allocations = {}
        self.expenditures = {}
        self.forecasts = {}
    
    def create_budget(self, budget_id, fiscal_year, total_budget):
        """Crear presupuesto de seguridad"""
        self.budget_data[budget_id] = {
            'budget_id': budget_id,
            'fiscal_year': fiscal_year,
            'total_budget': total_budget,
            'allocated_budget': 0,
            'spent_budget': 0,
            'remaining_budget': total_budget,
            'created_date': datetime.now(),
            'status': 'active'
        }
    
    def allocate_budget(self, budget_id, category, subcategory, amount, justification):
        """Asignar presupuesto por categoría"""
        if budget_id not in self.budget_data:
            return False
        
        allocation_key = f"{budget_id}_{category}_{subcategory}"
        
        self.allocations[allocation_key] = {
            'budget_id': budget_id,
            'category': category,
            'subcategory': subcategory,
            'amount': amount,
            'justification': justification,
            'allocated_date': datetime.now(),
            'status': 'allocated'
        }
        
        # Actualizar presupuesto asignado
        self.budget_data[budget_id]['allocated_budget'] += amount
        self.budget_data[budget_id]['remaining_budget'] -= amount
        
        return True
    
    def record_expenditure(self, budget_id, category, subcategory, amount, description, vendor):
        """Registrar gasto"""
        if budget_id not in self.budget_data:
            return False
        
        expenditure_id = f"EXP-{len(self.expenditures) + 1}"
        
        self.expenditures[expenditure_id] = {
            'expenditure_id': expenditure_id,
            'budget_id': budget_id,
            'category': category,
            'subcategory': subcategory,
            'amount': amount,
            'description': description,
            'vendor': vendor,
            'expenditure_date': datetime.now(),
            'status': 'approved'
        }
        
        # Actualizar presupuesto gastado
        self.budget_data[budget_id]['spent_budget'] += amount
        
        return True
    
    def calculate_budget_utilization(self, budget_id):
        """Calcular utilización del presupuesto"""
        if budget_id not in self.budget_data:
            return None
        
        budget = self.budget_data[budget_id]
        
        utilization = {
            'total_budget': budget['total_budget'],
            'allocated_budget': budget['allocated_budget'],
            'spent_budget': budget['spent_budget'],
            'remaining_budget': budget['remaining_budget'],
            'allocation_rate': (budget['allocated_budget'] / budget['total_budget'] * 100) if budget['total_budget'] > 0 else 0,
            'spending_rate': (budget['spent_budget'] / budget['total_budget'] * 100) if budget['total_budget'] > 0 else 0,
            'utilization_rate': (budget['spent_budget'] / budget['allocated_budget'] * 100) if budget['allocated_budget'] > 0 else 0
        }
        
        return utilization
    
    def generate_budget_report(self, budget_id):
        """Generar reporte de presupuesto"""
        if budget_id not in self.budget_data:
            return None
        
        budget = self.budget_data[budget_id]
        utilization = self.calculate_budget_utilization(budget_id)
        
        # Agrupar asignaciones por categoría
        category_allocations = {}
        for allocation in self.allocations.values():
            if allocation['budget_id'] == budget_id:
                category = allocation['category']
                if category not in category_allocations:
                    category_allocations[category] = 0
                category_allocations[category] += allocation['amount']
        
        # Agrupar gastos por categoría
        category_expenditures = {}
        for expenditure in self.expenditures.values():
            if expenditure['budget_id'] == budget_id:
                category = expenditure['category']
                if category not in category_expenditures:
                    category_expenditures[category] = 0
                category_expenditures[category] += expenditure['amount']
        
        report = {
            'budget_id': budget_id,
            'fiscal_year': budget['fiscal_year'],
            'utilization': utilization,
            'category_allocations': category_allocations,
            'category_expenditures': category_expenditures,
            'recommendations': self.generate_budget_recommendations(budget_id)
        }
        
        return report
    
    def generate_budget_recommendations(self, budget_id):
        """Generar recomendaciones de presupuesto"""
        recommendations = []
        
        utilization = self.calculate_budget_utilization(budget_id)
        if not utilization:
            return recommendations
        
        # Recomendaciones basadas en utilización
        if utilization['allocation_rate'] < 80:
            recommendations.append("Considerar aumentar la asignación de presupuesto para maximizar el uso")
        
        if utilization['spending_rate'] > 90:
            recommendations.append("Presupuesto casi agotado, considerar solicitar fondos adicionales")
        
        if utilization['utilization_rate'] < 50:
            recommendations.append("Baja utilización del presupuesto asignado, revisar proyectos")
        
        # Recomendaciones basadas en categorías
        category_allocations = {}
        for allocation in self.allocations.values():
            if allocation['budget_id'] == budget_id:
                category = allocation['category']
                if category not in category_allocations:
                    category_allocations[category] = 0
                category_allocations[category] += allocation['amount']
        
        total_allocated = sum(category_allocations.values())
        if total_allocated > 0:
            for category, amount in category_allocations.items():
                percentage = (amount / total_allocated) * 100
                if percentage > 40:
                    recommendations.append(f"Revisar asignación de {category} ({percentage:.1f}% del total)")
        
        return recommendations

# Ejemplo de uso
budget_mgmt = SecurityBudgetManagement()

# Crear presupuesto
budget_mgmt.create_budget('BUDGET-2025', 2025, 1000000)

# Asignar presupuesto por categorías
budget_mgmt.allocate_budget('BUDGET-2025', 'personnel', 'salaries', 400000, 'Salarios del equipo de seguridad')
budget_mgmt.allocate_budget('BUDGET-2025', 'technology', 'software', 200000, 'Licencias de software de seguridad')
budget_mgmt.allocate_budget('BUDGET-2025', 'services', 'consulting', 150000, 'Servicios de consultoría')
budget_mgmt.allocate_budget('BUDGET-2025', 'infrastructure', 'data_center', 150000, 'Infraestructura de centro de datos')
budget_mgmt.allocate_budget('BUDGET-2025', 'compliance', 'audits', 100000, 'Auditorías de cumplimiento')

# Registrar gastos
budget_mgmt.record_expenditure('BUDGET-2025', 'personnel', 'salaries', 50000, 'Salarios Q1', 'N/A')
budget_mgmt.record_expenditure('BUDGET-2025', 'technology', 'software', 25000, 'Licencia SIEM', 'Splunk')

# Generar reporte
report = budget_mgmt.generate_budget_report('BUDGET-2025')
print(f"Reporte de presupuesto: {report['utilization']['allocation_rate']:.1f}% asignado")

Análisis de ROI

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
class SecurityROIAnalysis:
    def __init__(self):
        self.investments = {}
        self.benefits = {}
        self.costs = {}
        self.roi_calculations = {}
    
    def add_investment(self, investment_id, investment_data):
        """Añadir inversión de seguridad"""
        self.investments[investment_id] = {
            'investment_id': investment_id,
            'name': investment_data['name'],
            'category': investment_data['category'],
            'initial_cost': investment_data['initial_cost'],
            'annual_cost': investment_data.get('annual_cost', 0),
            'expected_lifespan': investment_data.get('expected_lifespan', 5),
            'implementation_date': investment_data.get('implementation_date', datetime.now()),
            'description': investment_data.get('description', '')
        }
    
    def add_benefit(self, benefit_id, benefit_data):
        """Añadir beneficio de seguridad"""
        self.benefits[benefit_id] = {
            'benefit_id': benefit_id,
            'investment_id': benefit_data['investment_id'],
            'type': benefit_data['type'],
            'description': benefit_data['description'],
            'annual_value': benefit_data['annual_value'],
            'probability': benefit_data.get('probability', 1.0),
            'start_date': benefit_data.get('start_date', datetime.now())
        }
    
    def add_cost(self, cost_id, cost_data):
        """Añadir costo de seguridad"""
        self.costs[cost_id] = {
            'cost_id': cost_id,
            'investment_id': cost_data['investment_id'],
            'type': cost_data['type'],
            'description': cost_data['description'],
            'annual_cost': cost_data['annual_cost'],
            'start_date': cost_data.get('start_date', datetime.now())
        }
    
    def calculate_roi(self, investment_id, years=5):
        """Calcular ROI de una inversión"""
        if investment_id not in self.investments:
            return None
        
        investment = self.investments[investment_id]
        
        # Obtener beneficios y costos relacionados
        related_benefits = [b for b in self.benefits.values() if b['investment_id'] == investment_id]
        related_costs = [c for c in self.costs.values() if c['investment_id'] == investment_id]
        
        # Calcular flujo de caja anual
        cash_flows = []
        
        for year in range(years):
            year_benefits = sum(b['annual_value'] * b['probability'] for b in related_benefits)
            year_costs = sum(c['annual_cost'] for c in related_costs)
            
            if year == 0:
                # Año 0 incluye costo inicial
                year_costs += investment['initial_cost']
            
            net_cash_flow = year_benefits - year_costs
            cash_flows.append(net_cash_flow)
        
        # Calcular métricas de ROI
        total_investment = investment['initial_cost'] + sum(c['annual_cost'] for c in related_costs) * years
        total_benefits = sum(cash_flows)
        roi_percentage = (total_benefits / total_investment * 100) if total_investment > 0 else 0
        
        # Calcular período de recuperación
        cumulative_cash_flow = 0
        payback_period = None
        
        for year, cash_flow in enumerate(cash_flows):
            cumulative_cash_flow += cash_flow
            if cumulative_cash_flow >= 0 and payback_period is None:
                payback_period = year
        
        # Calcular NPV (Net Present Value) con tasa de descuento del 10%
        discount_rate = 0.10
        npv = sum(cf / (1 + discount_rate) ** year for year, cf in enumerate(cash_flows))
        
        roi_calculation = {
            'investment_id': investment_id,
            'investment_name': investment['name'],
            'total_investment': total_investment,
            'total_benefits': total_benefits,
            'roi_percentage': roi_percentage,
            'payback_period': payback_period,
            'npv': npv,
            'cash_flows': cash_flows,
            'years_analyzed': years
        }
        
        self.roi_calculations[investment_id] = roi_calculation
        return roi_calculation
    
    def compare_investments(self, investment_ids):
        """Comparar inversiones"""
        comparison = []
        
        for investment_id in investment_ids:
            if investment_id in self.roi_calculations:
                roi = self.roi_calculations[investment_id]
                comparison.append({
                    'investment_id': investment_id,
                    'investment_name': roi['investment_name'],
                    'roi_percentage': roi['roi_percentage'],
                    'payback_period': roi['payback_period'],
                    'npv': roi['npv'],
                    'total_investment': roi['total_investment']
                })
        
        # Ordenar por ROI
        comparison.sort(key=lambda x: x['roi_percentage'], reverse=True)
        
        return comparison
    
    def generate_investment_recommendations(self):
        """Generar recomendaciones de inversión"""
        recommendations = []
        
        if not self.roi_calculations:
            return recommendations
        
        # Recomendaciones basadas en ROI
        high_roi_investments = [roi for roi in self.roi_calculations.values() if roi['roi_percentage'] > 100]
        if high_roi_investments:
            recommendations.append({
                'type': 'high_roi',
                'message': f"Considerar priorizar {len(high_roi_investments)} inversiones con ROI > 100%",
                'investments': [roi['investment_name'] for roi in high_roi_investments]
            })
        
        # Recomendaciones basadas en período de recuperación
        quick_payback = [roi for roi in self.roi_calculations.values() if roi['payback_period'] is not None and roi['payback_period'] <= 2]
        if quick_payback:
            recommendations.append({
                'type': 'quick_payback',
                'message': f"Considerar {len(quick_payback)} inversiones con recuperación rápida (≤2 años)",
                'investments': [roi['investment_name'] for roi in quick_payback]
            })
        
        # Recomendaciones basadas en NPV
        positive_npv = [roi for roi in self.roi_calculations.values() if roi['npv'] > 0]
        if positive_npv:
            recommendations.append({
                'type': 'positive_npv',
                'message': f"Considerar {len(positive_npv)} inversiones con NPV positivo",
                'investments': [roi['investment_name'] for roi in positive_npv]
            })
        
        return recommendations

# Ejemplo de uso
roi_analysis = SecurityROIAnalysis()

# Añadir inversión
roi_analysis.add_investment('INV-001', {
    'name': 'SIEM Implementation',
    'category': 'technology',
    'initial_cost': 100000,
    'annual_cost': 25000,
    'expected_lifespan': 5,
    'description': 'Implementación de SIEM para monitoreo de seguridad'
})

# Añadir beneficios
roi_analysis.add_benefit('BEN-001', {
    'investment_id': 'INV-001',
    'type': 'risk_reduction',
    'description': 'Reducción de tiempo de detección de incidentes',
    'annual_value': 50000,
    'probability': 0.8
})

roi_analysis.add_benefit('BEN-002', {
    'investment_id': 'INV-001',
    'type': 'compliance',
    'description': 'Cumplimiento de regulaciones',
    'annual_value': 30000,
    'probability': 0.9
})

# Añadir costos
roi_analysis.add_cost('COST-001', {
    'investment_id': 'INV-001',
    'type': 'maintenance',
    'description': 'Mantenimiento y soporte',
    'annual_cost': 15000
})

# Calcular ROI
roi_result = roi_analysis.calculate_roi('INV-001')
print(f"ROI de SIEM: {roi_result['roi_percentage']:.1f}%")
print(f"Período de recuperación: {roi_result['payback_period']} años")

Gestión de Recursos Humanos

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
class HumanResourceManagement:
    def __init__(self):
        self.team_members = {}
        self.skills_matrix = {}
        self.training_programs = {}
        self.performance_metrics = {}
    
    def add_team_member(self, member_id, member_data):
        """Añadir miembro del equipo"""
        self.team_members[member_id] = {
            'member_id': member_id,
            'name': member_data['name'],
            'role': member_data['role'],
            'level': member_data.get('level', 'junior'),
            'skills': member_data.get('skills', []),
            'certifications': member_data.get('certifications', []),
            'experience_years': member_data.get('experience_years', 0),
            'salary': member_data.get('salary', 0),
            'availability': member_data.get('availability', 1.0),
            'performance_score': member_data.get('performance_score', 0.0)
        }
    
    def assess_skills_gap(self, required_skills):
        """Evaluar brecha de habilidades"""
        skills_gap = {}
        
        for skill in required_skills:
            skill_name = skill['name']
            required_level = skill['level']
            
            team_skill_levels = []
            for member in self.team_members.values():
                for member_skill in member['skills']:
                    if member_skill['name'] == skill_name:
                        team_skill_levels.append(member_skill['level'])
            
            if team_skill_levels:
                max_team_level = max(team_skill_levels)
                gap = max(0, required_level - max_team_level)
            else:
                gap = required_level
                max_team_level = 0
            
            skills_gap[skill_name] = {
                'required_level': required_level,
                'max_team_level': max_team_level,
                'gap': gap,
                'team_members_with_skill': len([level for level in team_skill_levels if level > 0])
            }
        
        return skills_gap
    
    def create_training_plan(self, member_id, target_skills):
        """Crear plan de capacitación"""
        if member_id not in self.team_members:
            return None
        
        member = self.team_members[member_id]
        current_skills = {skill['name']: skill['level'] for skill in member['skills']}
        
        training_plan = {
            'member_id': member_id,
            'member_name': member['name'],
            'target_skills': target_skills,
            'training_modules': [],
            'estimated_duration': 0,
            'estimated_cost': 0,
            'priority': 'medium'
        }
        
        for skill in target_skills:
            skill_name = skill['name']
            target_level = skill['level']
            current_level = current_skills.get(skill_name, 0)
            
            if current_level < target_level:
                gap = target_level - current_level
                
                # Determinar módulos de capacitación necesarios
                modules = self.get_training_modules(skill_name, current_level, target_level)
                
                for module in modules:
                    training_plan['training_modules'].append({
                        'skill': skill_name,
                        'module_name': module['name'],
                        'duration_hours': module['duration_hours'],
                        'cost': module['cost'],
                        'provider': module['provider']
                    })
                    
                    training_plan['estimated_duration'] += module['duration_hours']
                    training_plan['estimated_cost'] += module['cost']
        
        # Determinar prioridad basada en brecha
        total_gap = sum(skill['gap'] for skill in target_skills)
        if total_gap > 10:
            training_plan['priority'] = 'high'
        elif total_gap > 5:
            training_plan['priority'] = 'medium'
        else:
            training_plan['priority'] = 'low'
        
        return training_plan
    
    def get_training_modules(self, skill_name, current_level, target_level):
        """Obtener módulos de capacitación"""
        # Base de datos de módulos de capacitación
        training_modules = {
            'network_security': [
                {'name': 'Network Security Fundamentals', 'duration_hours': 40, 'cost': 2000, 'provider': 'Cisco'},
                {'name': 'Advanced Network Security', 'duration_hours': 60, 'cost': 3000, 'provider': 'SANS'},
                {'name': 'Network Penetration Testing', 'duration_hours': 80, 'cost': 4000, 'provider': 'Offensive Security'}
            ],
            'incident_response': [
                {'name': 'Incident Response Fundamentals', 'duration_hours': 32, 'cost': 1500, 'provider': 'SANS'},
                {'name': 'Advanced Incident Response', 'duration_hours': 48, 'cost': 2500, 'provider': 'SANS'},
                {'name': 'Digital Forensics', 'duration_hours': 64, 'cost': 3500, 'provider': 'SANS'}
            ],
            'cloud_security': [
                {'name': 'Cloud Security Fundamentals', 'duration_hours': 24, 'cost': 1200, 'provider': 'AWS'},
                {'name': 'Advanced Cloud Security', 'duration_hours': 40, 'cost': 2000, 'provider': 'Microsoft'},
                {'name': 'Cloud Security Architecture', 'duration_hours': 56, 'cost': 2800, 'provider': 'Google'}
            ]
        }
        
        modules = training_modules.get(skill_name, [])
        
        # Filtrar módulos basados en nivel actual y objetivo
        relevant_modules = []
        for module in modules:
            if current_level < 3 and 'Fundamentals' in module['name']:
                relevant_modules.append(module)
            elif current_level >= 3 and current_level < 5 and 'Advanced' in module['name']:
                relevant_modules.append(module)
            elif current_level >= 5 and 'Architecture' in module['name']:
                relevant_modules.append(module)
        
        return relevant_modules
    
    def calculate_team_capacity(self):
        """Calcular capacidad del equipo"""
        total_capacity = 0
        available_capacity = 0
        
        for member in self.team_members.values():
            member_capacity = member['availability'] * 40  # 40 horas por semana
            total_capacity += member_capacity
            available_capacity += member_capacity
        
        return {
            'total_capacity': total_capacity,
            'available_capacity': available_capacity,
            'utilization_rate': (total_capacity - available_capacity) / total_capacity * 100 if total_capacity > 0 else 0,
            'team_size': len(self.team_members)
        }
    
    def generate_team_report(self):
        """Generar reporte del equipo"""
        capacity = self.calculate_team_capacity()
        
        # Análisis de habilidades
        all_skills = set()
        for member in self.team_members.values():
            for skill in member['skills']:
                all_skills.add(skill['name'])
        
        skills_analysis = {}
        for skill in all_skills:
            members_with_skill = [m for m in self.team_members.values() 
                                if any(s['name'] == skill for s in m['skills'])]
            skills_analysis[skill] = {
                'team_members': len(members_with_skill),
                'average_level': sum(s['level'] for m in members_with_skill 
                                   for s in m['skills'] if s['name'] == skill) / len(members_with_skill) if members_with_skill else 0
            }
        
        # Análisis de rendimiento
        performance_scores = [m['performance_score'] for m in self.team_members.values() if m['performance_score'] > 0]
        average_performance = sum(performance_scores) / len(performance_scores) if performance_scores else 0
        
        report = {
            'team_capacity': capacity,
            'skills_analysis': skills_analysis,
            'average_performance': average_performance,
            'team_members': len(self.team_members),
            'recommendations': self.generate_team_recommendations()
        }
        
        return report
    
    def generate_team_recommendations(self):
        """Generar recomendaciones para el equipo"""
        recommendations = []
        
        capacity = self.calculate_team_capacity()
        
        if capacity['utilization_rate'] > 90:
            recommendations.append("Considerar contratar personal adicional - alta utilización del equipo")
        
        if capacity['utilization_rate'] < 50:
            recommendations.append("Revisar asignación de tareas - baja utilización del equipo")
        
        # Recomendaciones basadas en habilidades
        all_skills = set()
        for member in self.team_members.values():
            for skill in member['skills']:
                all_skills.add(skill['name'])
        
        for skill in all_skills:
            members_with_skill = [m for m in self.team_members.values() 
                                if any(s['name'] == skill for s in m['skills'])]
            
            if len(members_with_skill) < 2:
                recommendations.append(f"Desarrollar habilidades en {skill} - solo {len(members_with_skill)} miembro(s) del equipo")
        
        return recommendations

# Ejemplo de uso
hr_mgmt = HumanResourceManagement()

# Añadir miembros del equipo
hr_mgmt.add_team_member('TM-001', {
    'name': 'Ana García',
    'role': 'Security Analyst',
    'level': 'senior',
    'skills': [
        {'name': 'network_security', 'level': 4},
        {'name': 'incident_response', 'level': 3}
    ],
    'certifications': ['CISSP', 'GCIH'],
    'experience_years': 5,
    'salary': 80000,
    'performance_score': 4.2
})

# Evaluar brecha de habilidades
required_skills = [
    {'name': 'network_security', 'level': 5},
    {'name': 'cloud_security', 'level': 3},
    {'name': 'incident_response', 'level': 4}
]

skills_gap = hr_mgmt.assess_skills_gap(required_skills)
print(f"Brecha de habilidades: {skills_gap}")

# Generar reporte del equipo
team_report = hr_mgmt.generate_team_report()
print(f"Reporte del equipo: {team_report['team_members']} miembros")

Mejores Prácticas

Planificación Presupuestaria

  • Alineación: Alineación con objetivos del negocio
  • Flexibilidad: Presupuesto flexible para cambios
  • Transparencia: Transparencia en asignación de recursos
  • Monitoreo: Monitoreo regular del gasto

Gestión de Recursos

  • Optimización: Optimización de recursos disponibles
  • Desarrollo: Desarrollo de capacidades del equipo
  • Retención: Retención de talento clave
  • Eficiencia: Eficiencia en la asignación

Medición de Valor

  • ROI: Medición del retorno de inversión
  • Métricas: Métricas de efectividad
  • Beneficios: Cuantificación de beneficios
  • Costos: Análisis de costos totales

Conceptos Relacionados

Referencias