Помощь в написании студенческих работ
Антистрессовый сервис

Статистический анализ объема, структуры и динамики иностранных инвестиций в экономику г. Санкт — Петербурга

Курсовая Купить готовую Узнать стоимостьмоей работы

ShowMessage ('Где-то ошибка (пустые или нечисловые значения), проверьте данные.'); SGPrognoz. Cells: =FloatToStr ((StrToFloat (SGDinamika.Cells)-y_sredn)*(StrToFloat (SGDinamika.Cells)-y_sredn)); LabelPrognoz. Caption:='Прогноз на следующий период ('+SGTablicaInvesticiy.Cells+'):'; CoordOfLine. Y:=Image1.Height-InMasshtab.Y-(Round (StrToFloat (SGTablicaInvesticiy.Cells)) div InMasshtab. Y… Читать ещё >

Статистический анализ объема, структуры и динамики иностранных инвестиций в экономику г. Санкт — Петербурга (реферат, курсовая, диплом, контрольная)

Содержание

  • 1. Экономическая сущность инвестиций
    • 1. 1. Понятие инвестиций и инвестиционной деятельности
    • 1. 2. Группировка иностранных инвестиций
    • 1. 3. Источники статистической информации об инвестициях
  • 2. Статистический анализ инвестиций
    • 2. 1. Анализ структуры иностранных инвестиций в Санкт-Петербург
    • 2. 2. Анализ динамики поступления иностранных инвестиций в г. Санкт-Петербург
  • 3. Проектная часть
    • 3. 1. Описание переменных, процедур и функций
    • 3. 2. Описание программы
    • 3. 3. Расчет значений анализа динамики поступления иностранных инвестиций в г. Санкт-Петербург с помощью программы
  • Заключение
  • Список использованной литературы
  • Приложение Исходный код программы

dfm}

procedure TForm1. N2Click (Sender: TObject); //load data table

var f: TStringList;

TempString: string;

i, j, thisCol: integer;

begin

if OpenDialog1. Execute then

begin

try

f:=TstringList.Create ();

f.LoadFromFile (OpenDialog1.FileName);

j:=0;

SGTablicaInvesticiy.ColCount:=j;

for i:=1 to Length (f.Strings[0]) do if f. Strings[0][i]=';' then Inc (j);

SGTablicaInvesticiy.ColCount:=j;

SGTablicaInvesticiy.RowCount:=f.Count;

SGTablicaInvesticiy.FixedCols:=1;

SGTablicaInvesticiy.FixedRows:=1;

TempString:='';

ThisCol:=0;

for j:=0 to f. Count-1 do

for i:=1 to Length (f.Strings[j]) do

begin

if f. Strings[j][i]=';' then

begin

SGTablicaInvesticiy.Cells[ThisCol, j]: =TempString;

TempString:='';

Inc (ThisCol);

if ThisCol>SGTablicaInvesticiy.ColCount-1 then ThisCol:=0;

end

else TempString:=TempString+f.Strings[j][i];

end;

// SGTablicaInvesticiy. ColWidths[ThisCol]: =Length (TempString)*8;

Raschet;

Prognoz;

Grafik;

except

f.Free; end;

end;

end;

procedure TForm1. N12Click (Sender: TObject); //new data table

begin

Unit3.Form3.ShowModal;

end;

procedure TForm1. Raschet;

var j: integer;

TempConst: real;

begin

SGDinamika.RowCount:=SGTablicaInvesticiy.ColCount+1;

for j:=0 to SGTablicaInvesticiy. ColCount-1 do

begin

SGDinamika.Cells[0,j+1]: =SGTablicaInvesticiy.Cells[j, 0]; //god

SGDinamika.Cells[1,j+1]: =SGTablicaInvesticiy.Cells[j, 1]; //Y

end;

SGDinamika.Cells[2,0]: ='Абс.пр';

SGDinamika.Cells[4,0]: ='ТР';

SGDinamika.Cells[6,0]: ='Т.пр';

SGDinamika.Cells[2,1]: ='Баз';

SGDinamika.Cells[3,1]: ='Цеп';

SGDinamika.Cells[4,1]: ='Баз';

SGDinamika.Cells[5,1]: ='Цеп';

SGDinamika.Cells[6,1]: ='Баз';

SGDinamika.Cells[7,1]: ='Цеп';

TempConst:=StrToFloat (SGDinamika.Cells[1,2]);

for j:=3 to SGDinamika. RowCount-1 do

begin

SGDinamika.Cells[2,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[1,j])-TempConst);

SGDinamika.Cells[3,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[1,j])-StrToFloat (SGDinamika.Cells[1,j-1]));

end;

for j:=3 to SGDinamika. RowCount-1 do

begin

SGDinamika.Cells[4,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[1,j])/TempConst*100);

SGDinamika.Cells[5,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[1,j])/StrToFloat (SGDinamika.Cells[1,j-1])*100);

end;

for j:=3 to SGDinamika. RowCount-1 do

begin

SGDinamika.Cells[6,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[4,j])-100);

SGDinamika.Cells[7,j]: =FloatToStr (StrToFloat (SGDinamika.Cells[5,j])-100);

end;

end;

procedure TForm1. Prognoz;

var t: integer;

a, b, y, y_sredn, R2: real;

delta, deltaa, deltab: real;

TempFloat: real;

begin

SGPrognoz.ColCount:=8;

SGPrognoz.RowCount:=SGDinamika.ColCount+3;

SGPrognoz.Cells[0,0]: ='Период';

SGPrognoz.Cells[1,0]: ='y';

SGPrognoz.Cells[2,0]: ='t';

SGPrognoz.Cells[3,0]: ='t2';

SGPrognoz.Cells[4,0]: ='yt';

SGPrognoz.Cells[5,0]: ='(y-y^)^2';

SGPrognoz.Cells[6,0]: ='(y-y_sredn)^2';

SGPrognoz.Cells[7,0]: ='y^';

for t:=2 to SGDinamika. ColCount+1 do

SGPrognoz.Cells[0,t-1]: =SGDinamika.Cells[0,t];

SGPrognoz.Cells[0,SGDinamika.ColCount+1]: ='Сумма:';

SGPrognoz.Cells[0,SGDinamika.ColCount+2]: ='Прогноз:';

// y:

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+StrToFloat (SGDinamika.Cells[1,t+1]);

SGPrognoz.Cells[1,t]: =SGDinamika.Cells[1,t+1];

end;

SGPrognoz.Cells[1,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

// t:

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+t;

SGPrognoz.Cells[2,t]: =IntToStr (t);

end;

SGPrognoz.Cells[2,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

// t2:

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+t*t;

SGPrognoz.Cells[3,t]: =IntToStr (t*t);

end;

SGPrognoz.Cells[3,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

// yt:

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+StrToFloat (SGDinamika.Cells[1,t+1])*t;

SGPrognoz.Cells[4,t]: =FloatToStr (StrToFloat (SGDinamika.Cells[1,t+1])*t);

end;

SGPrognoz.Cells[4,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

Delta:=StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-2])*//t

StrToFloat (SGPrognoz.Cells[3,SGDinamika.RowCount-1])-//summ t2

StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-1])*//summ t

StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-1]);//summ t

Deltaa:=StrToFloat (SGPrognoz.Cells[1,SGDinamika.RowCount-1])*//summ y

StrToFloat (SGPrognoz.Cells[3,SGDinamika.RowCount-1])-//summ t2

StrToFloat (SGPrognoz.Cells[4,SGDinamika.RowCount-1])*//summ yt

StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-1]);//summ t

Deltab:=StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-2])*//t

StrToFloat (SGPrognoz.Cells[4,SGDinamika.RowCount-1])-//summ yt

StrToFloat (SGPrognoz.Cells[2,SGDinamika.RowCount-1])*//summ t

StrToFloat (SGPrognoz.Cells[1,SGDinamika.RowCount-1]);//summ y

a:=Deltaa/Delta;

b:=Deltab/Delta;

y:=a+(b*(SGDinamika.RowCount-1));

//y^

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+(a+b*t);

SGPrognoz.Cells[7,t]: =FloatToStr (a+b*t);

end;

SGPrognoz.Cells[7,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

//(y-y^)^2

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+((StrToFloat (SGDinamika.Cells[1,t+1])-StrToFloat (SGPrognoz.Cells[7,t]))

*(StrToFloat (SGDinamika.Cells[1,t+1])-StrToFloat (SGPrognoz.Cells[7,t])));

SGPrognoz.Cells[5,t]: =FloatToStr ((StrToFloat (SGDinamika.Cells[1,t+1])-StrToFloat (SGPrognoz.Cells[7,t]))

*(StrToFloat (SGDinamika.Cells[1,t+1])-StrToFloat (SGPrognoz.Cells[7,t])));

end;

SGPrognoz.Cells[5,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

// y_sredn

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

TempFloat:=TempFloat+(StrToFloat (SGDinamika.Cells[1,t+1]));

y_sredn:=TempFloat/(SGDinamika.RowCount-2);

//(y-y_sredn)^2

TempFloat:=0;

for t:=1 to SGDinamika. RowCount-2 do

begin

TempFloat:=TempFloat+((StrToFloat (SGDinamika.Cells[1,t+1])-y_sredn)*(StrToFloat (SGDinamika.Cells[1,t+1])-y_sredn));

SGPrognoz.Cells[6,t]: =FloatToStr ((StrToFloat (SGDinamika.Cells[1,t+1])-y_sredn)*(StrToFloat (SGDinamika.Cells[1,t+1])-y_sredn));

end;

SGPrognoz.Cells[6,SGDinamika.RowCount-1]: =FloatToStr (TempFloat);

//Коэффициент детерминации:

R2:=1-(StrToFloat (SGPrognoz.Cells[5,SGDinamika.RowCount-1])/StrToFloat (SGPrognoz.Cells[6,SGDinamika.RowCount-1]));

EditKoeffDeterm.Text:=FloatToStr (R2);

Labela.Caption:='a='+FloatToStr (a);

Labelb.Caption:='b='+FloatToStr (b);

SGPrognoz.Cells[1,SGDinamika.RowCount]: =FloatToStr (y);

EditPrognoz.Text:=SGPrognoz.Cells[1,SGDinamika.RowCount];

LabelHaracter.Caption:='Зависимость: линейная.';

LabelPrognoz.Caption:='Прогноз на следующий период ('+SGTablicaInvesticiy.Cells[0,0]+'):';

end;

procedure TForm1. Grafik;

var TempInteger, i, Count: Integer;

InMasshtab: TPoint;

CoordOfLine: array of TPoint;

begin

Image1.Canvas.Pen.Color:=clLtGray;

Image1.Canvas.Pen.Width:=1;

Image1.Canvas.Pen.Style:=psSolid;

Image1.Canvas.Rectangle (0,0,Image1.Width, Image1. Height);

SetLength (CoordOfLine, SGTablicaInvesticiy. ColCount);

InMasshtab.X:=Image1.Width div (SGTablicaInvesticiy.ColCount+1);

InMasshtab.Y:=Image1.Height div (SGTablicaInvesticiy.ColCount+10);

//Координатная сетка:

Image1.Canvas.MoveTo (InMasshtab.X, InMasshtab. Y);

Image1.Canvas.LineTo (InMasshtab.X, Image1. Height-InMasshtab.Y);

Image1.Canvas.MoveTo (InMasshtab.X, Image1. Height-InMasshtab.Y);

Image1.Canvas.LineTo (Image1.Width-InMasshtab.X, Image1. Height-InMasshtab.Y);

for i:=0 to SGTablicaInvesticiy. ColCount-2 do

begin

CoordOfLine[i]. X:=i*InMasshtab.X+(Image1.Width div SGTablicaInvesticiy. ColCount);

CoordOfLine[i]. Y:=Image1.Height-InMasshtab.Y-(Round (StrToFloat (SGTablicaInvesticiy.Cells[i+1,1])) div InMasshtab. Y);

end;

//Значения по периодам:

for i:=0 to SGTablicaInvesticiy. ColCount-2 do

Image1.Canvas.TextOut (CoordOfLine[0]. X-(InMasshtab.X div 2), CoordOfLine[i]. Y, SGTablicaInvesticiy. Cells[i, 1]);

for i:=0 to SGTablicaInvesticiy. ColCount-1 do

Image1.Canvas.TextOut (i*inMasshtab.X, Image1. Height-(InMasshtab.Y), SGTablicaInvesticiy. Cells[i, 0]);

Image1.Canvas.MoveTo (CoordOfLine[0]. X, CoordOfLine[0].Y);

for i:=1 to SGTablicaInvesticiy. ColCount-2 do

begin

Image1.Canvas.Pen.Color:=clLtGray;

Image1.Canvas.Pen.Width:=1;

Image1.Canvas.Pen.Style:=psDash;

Image1.Canvas.MoveTo (CoordOfLine[0]. X, CoordOfLine[i].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.MoveTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[0].Y);

Image1.Canvas.Pen.Color:=clBlack;

Image1.Canvas.Pen.Width:=3;

Image1.Canvas.Pen.Style:=psSolid;

Image1.Canvas.MoveTo (CoordOfLine[i-1]. X, CoordOfLine[i-1].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.Ellipse (CoordOfLine[i]. X-5,CoordOfLine[i].Y-5,CoordOfLine[i].X+5,CoordOfLine[i].Y+5);

end;

// prognoz:

for i:=0 to SGPrognoz. RowCount-4 do

begin

CoordOfLine[i]. X:=i*InMasshtab.X+(Image1.Width div SGTablicaInvesticiy. ColCount);

CoordOfLine[i]. Y:=Image1.Height-InMasshtab.Y-(Round (StrToFloat (SGPrognoz.Cells[7,i+1])) div InMasshtab. Y);

end;

Image1.Canvas.MoveTo (CoordOfLine[0]. X, CoordOfLine[0].Y);

for i:=1 to SGTablicaInvesticiy. ColCount-2 do

begin

Image1.Canvas.Pen.Color:=clRed;

Image1.Canvas.Pen.Width:=1;

Image1.Canvas.Pen.Style:=psSolid;

Image1.Canvas.MoveTo (CoordOfLine[i-1]. X, CoordOfLine[i-1].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.Ellipse (CoordOfLine[i]. X-5,CoordOfLine[i].Y-5,CoordOfLine[i].X+5,CoordOfLine[i].Y+5);

end;

i:=SGPrognoz.RowCount-3;

CoordOfLine[i]. X:=CoordOfLine[i-1].X+InMasshtab.X;

CoordOfLine[i]. Y:=Image1.Height-InMasshtab.Y-((Round (StrToFloat (SGPrognoz.Cells[1,i+2])) div InMasshtab. Y));

Image1.Canvas.MoveTo (CoordOfLine[i-1]. X, CoordOfLine[i-1].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.Ellipse (CoordOfLine[i]. X-5,CoordOfLine[i].Y-5,CoordOfLine[i].X+5,CoordOfLine[i].Y+5);

Image1.Canvas.Pen.Color:=clRed;

Image1.Canvas.Pen.Width:=1;

Image1.Canvas.Pen.Style:=psDot;

Image1.Canvas.MoveTo (CoordOfLine[0]. X, CoordOfLine[i].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.MoveTo (CoordOfLine[i]. X, CoordOfLine[i].Y);

Image1.Canvas.LineTo (CoordOfLine[i]. X, CoordOfLine[0].Y);

Image1.Canvas.Font.Color:=clRed;

Image1.Canvas.TextOut (CoordOfLine[0]. X, CoordOfLine[i].Y, SGPrognoz. Cells[1,i+2]);

Image1.Canvas.TextOut (i*inMasshtab.X+inMasshtab.X, Image1. Height-(InMasshtab.Y), SGPrognoz. Cells[0,i+2]);

end;

procedure TForm1. N7Click (Sender: TObject);

begin

Unit2.AboutBox.ShowModal;

end;

procedure TForm1. N11Click (Sender: TObject);

begin

PageControl1.ActivePageIndex:=0;

end;

procedure TForm1. N13Click (Sender: TObject);

begin

PageControl1.ActivePageIndex:=1;

end;

procedure TForm1. N14Click (Sender: TObject);

begin

PageControl1.ActivePageIndex:=2;

end;

procedure TForm1. N15Click (Sender: TObject);

begin

PageControl1.ActivePageIndex:=3;

end;

procedure TForm1. N9Click (Sender: TObject);

begin

try

begin

Raschet;

Grafik;

Prognoz;

end

except

ShowMessage ('Где-то ошибка (пустые или нечисловые значения), проверьте данные.');

end;

end;

procedure TForm1. N5Click (Sender: TObject);

begin

Close;

end;

procedure TForm1. N3Click (Sender: TObject);

var f: TStringList;

TempString: string;

i: integer;

begin

if OpenDialog1. Execute then

begin

OpenDialog1.Title:='Сохранить';

f:=TstringList.Create ();

f.Clear;

TempString:='';

for i:=0 to SGTablicaInvesticiy. ColCount-1 do

TempString:=TempString+SGTablicaInvesticiy.Cells[i, 0]+';';

f.Append (TempString);

TempString:='';

for i:=0 to SGTablicaInvesticiy. ColCount-1 do

TempString:=TempString+SGTablicaInvesticiy.Cells[i, 1]+';';

f.Append (TempString);

f.SaveToFile (OpenDialog1.FileName+'.txt');

f.Free;

end;

end;

procedure TForm1. FormCreate (Sender: TObject);

var f: TStringList;

TempString: string;

i, j, thisCol: integer;

begin

begin

try

f:=TstringList.Create ();

f.LoadFromFile ('2003;2010.txt');

j:=0;

SGTablicaInvesticiy.ColCount:=j;

for i:=1 to Length (f.Strings[0]) do if f. Strings[0][i]=';' then Inc (j);

SGTablicaInvesticiy.ColCount:=j;

SGTablicaInvesticiy.RowCount:=f.Count;

SGTablicaInvesticiy.FixedCols:=1;

SGTablicaInvesticiy.FixedRows:=1;

TempString:='';

ThisCol:=0;

for j:=0 to f. Count-1 do

for i:=1 to Length (f.Strings[j]) do

begin

if f. Strings[j][i]=';' then

begin

SGTablicaInvesticiy.Cells[ThisCol, j]: =TempString;

TempString:='';

Inc (ThisCol);

if ThisCol>SGTablicaInvesticiy.ColCount-1 then ThisCol:=0;

end

else TempString:=TempString+f.Strings[j][i];

end;

// SGTablicaInvesticiy. ColWidths[ThisCol]: =Length (TempString)*8;

Raschet;

Prognoz;

Grafik;

except

f.Free; end;

end;

end;

end.

Показать весь текст

Список литературы

  1. Т.А., Серегина С. Ф. Макроэкономика. — М.: МГУ, 2007.С. 64−77, 88−117.
  2. В. М. Теория статистики. М.: Юнити, 1998 С.320
  3. Э. Дис, Линдсей Д. Макроэкономика. С. Пб. 1994. С. 73−136.
  4. И. И., Юзбашев М. М. Общая теория статистики. М.: Финансы и статистика: 1999 С.354
  5. Л. И. Основы общей теории статистики. М.: Финансы и статистика, 2002. С.222
  6. Курс экономической теории / Под ред. Чепурина М. Н., Киселевой Е. А. / Киров, АСА, 2007. С. 305 — 350.
  7. А. Макроэкономика: ключевые вопросы — СПб, Питер, 1999. С. 26−37.
  8. К.Р., Брю С.Л. Экономикс: принципы, проблемы и политика. В 2 т. ТI — М. Республика, 1992. С. 175−191, 194−240.
  9. Макроэкономика / Под ред. И. П. Николаевой / ВЗФЭИ — М.: ЗАО Финстатинформ, 1999. С.118−138.
  10. В.Ф. Реальные инвестиции / Московский государственный университет экономики, статистики и информатики. — М., — 2001. — 59 с.
  11. В.Ф., Горяинова Л. В., Куваева М. В., Лигай Г. А., Пашковская М. В., Помаскина О. В. Макроэкономика / Моск. гос. ун-т экономики, статистики и информатики. — М., — 2001. 75 с.
  12. Н.Г. Макроэкономика. Пер. с англ. Гл. 2, 3 М.: 1994.
  13. И.П. Экономическая теория / МЭСИ — М., 1999. С. 48−61, 64−76.
  14. Э. Основы экономической теории. М.: Наука, 2007 т.1. ВВП и экономические циклы
  15. Рыночная экономика: Учебник. В 3 т. Т 1. Теория рыночной экономики. Часть 2. Максимова В. Ф., Шишов А. Л. Макроэкономика. — М.: СО-МИНТЭК.1992.С. 55−68, 83−97.
  16. П., Нордхаус. Экономика. М. 1998.
  17. А. А. Башина О.Э. «Общая теория статистики. Статистическая методология в изучении коммерческой деятельности. Учебник 5-е изд»: Финстат, 2006 С.180
  18. С., Дорнбуш Р., Шмалензи Р. Экономика / Пер. с англ. Гл. 24 М.: 1993.
  19. А.Л. Макроэкономика. — М.: ЭКМОС, 2007.С. 102−109.
  20. Р.А. «Практикум по теории статистики. Учебное пособие», Финстат: 2002 С.102
  21. Экономическая теория / Под ред. А. И. Добрынина, Л. С. Тарасевича — С. Пб: Питер Ком, 1999. С. 285−308.
  22. http://www.gks.ru/
  23. М. Е., Библия Delphi. — СПб.; БХВ-Петербург, 2004. — 880 с.: ил.
Заполнить форму текущей работой
Купить готовую работу

ИЛИ